Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature zms 2962 extend log table #570

Open
wants to merge 31 commits into
base: next
Choose a base branch
from

Conversation

manjencic
Copy link
Contributor

Description

Short description or comments

Reference

Issues #XXX

\DateTimeInterface $now,
$resolveReferences = 0,
$previousStatus = null,
?\BO\Zmsentities\Useraccount $useraccount = null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$useraccount should be $userAccount

$process,
\BO\Zmsentities\Scope $scope,
int $waitingNumber,
?\BO\Zmsentities\Useraccount $useraccount = null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$useraccount should be $userAccount

Query::writeProcessLog(
"MTA successful, subject=" . $mimepart->content,
Query::ACTION_MAIL_FAIL,
$process
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix the logical error in the condition block

There appears to be a mismatch between the $isError condition and the logged actions. Currently, a success action is logged when there's an error, and vice versa. This needs to be corrected to ensure accurate logging.

Please apply the following changes:

 if ($isError) {
     Query::writeProcessLog(
         "MTA failed, message=" . $mimepart->content,
-        Query::ACTION_MAIL_SUCCESS,
+        Query::ACTION_MAIL_FAIL,
         $process
     );
 } else {
     Query::writeProcessLog(
         "MTA successful, subject=" . $mimepart->content,
-        Query::ACTION_MAIL_FAIL,
+        Query::ACTION_MAIL_SUCCESS,
         $process
     );
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
$process
Query::writeProcessLog(
"MTA failed, message=" . $mimepart->content,
Query::ACTION_MAIL_FAIL,
$process
);
} else {
Query::writeProcessLog(
"MTA successful, subject=" . $mimepart->content,
Query::ACTION_MAIL_SUCCESS,
$process

@ThomasAFink
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants