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

Notifications for technicians in tickets #835

Merged
merged 7 commits into from
Dec 21, 2023
Merged

Notifications for technicians in tickets #835

merged 7 commits into from
Dec 21, 2023

Conversation

o-psi
Copy link
Contributor

@o-psi o-psi commented Dec 19, 2023

This pull request refactors the email functionality in the codebase to use the newly created addToMailQueue function. This function centralizes the process of adding emails to the email queue, improving code organization and reducing code duplication.

This was needed to be done IMO before 1.0.

This also fixed the notifications for technicians as mentioned here: #563

@wrongecho
Copy link
Collaborator

Test these changes at: https://ticketnotifications835.pr-review.itflow.org
(automatic message)

$subject = $email['subject'];
$body = $email['body'];

mysqli_query($mysqli, "INSERT INTO email_queue SET email_recipient = '$recipient', email_recipient_name = '$recipient_name', email_from = '$config_invoice_from_email', email_from_name = '$config_invoice_from_name', email_subject = '$subject', email_content = '$body'");

Check failure

Code scanning / SonarCloud

Database queries should not be vulnerable to injection attacks

<!--SONAR_ISSUE_KEY:AYyEVO_IL0aq_SJu4rVM-->Change this code to not construct SQL queries directly from user-controlled data. <p>See more on <a href="https://sonarcloud.io/project/issues?id=itflow-org_itflow&issues=AYyEVO_IL0aq_SJu4rVM&open=AYyEVO_IL0aq_SJu4rVM&pullRequest=835">SonarCloud</a></p>
Forgot to add in the sanitations.
Copy link

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
No data about Coverage
6.8% Duplication on New Code

See analysis details on SonarCloud

@johnnyq
Copy link
Collaborator

johnnyq commented Dec 20, 2023

This looks fantastic and was much needed to be done. I like new function.
It looks good but wont know for sure until I pull it in to test further on my local instance.

@o-psi Did you test all or some the mail Functionality with this update by chance?

@o-psi
Copy link
Contributor Author

o-psi commented Dec 20, 2023

I tested Invoice, Quotes, reset password, and generate password.

@johnnyq
Copy link
Collaborator

johnnyq commented Dec 21, 2023

Merging in we'll test from here but everything looks good

@johnnyq johnnyq merged commit a35a6f3 into itflow-org:master Dec 21, 2023
@o-psi o-psi deleted the ticket_notifications branch December 22, 2023 18:26
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.

3 participants