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

Sending new assignee email while creating a case is not working. #10387

Open
ebsi-RBakade opened this issue Apr 3, 2024 · 4 comments
Open

Sending new assignee email while creating a case is not working. #10387

ebsi-RBakade opened this issue Apr 3, 2024 · 4 comments
Labels
Status:Requires Updates Issues & PRs which requires input or update from the author

Comments

@ebsi-RBakade
Copy link

Issue

Email notification is not sending while creating a case at the first timet to assignee. But when we update case and reassign case to other User then it works.

Expected Behavior

It should send an email to assignee for newly created Case.

Actual Behavior

Email is not sending to assignee when new case is created.

Possible Fix

Move the following line below if else block
https://github.com/salesagility/SuiteCRM/blob/hotfix/data/SugarBean.php#L2411

$this->_sendNotifications($check_notify);
it should be below if else block because at that time case is not created. It gets only created in the else block having insert() function.
When I moved _sendNotification() line below if else block then it’s working as intended.

Steps to Reproduce

  1. create a new case by filling all the required fields.
  2. make sure that assignee field should not be blank and that assignee should have valid email address.
  3. save the case.
  4. email is received without contact and and case number.

Context

Your Environment

  • SuiteCRM Version used: 7.4.3
  • Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): Google Chrome 123.0.6312.86 (Official Build) (32-bit)
  • Environment name and version (e.g. MySQL, PHP 7): MariaDB : 5.5.5-10.1.21, PHP 5.3
  • Operating System and version (e.g Ubuntu 16.04):Windows 32 Bit
@chris001
Copy link
Contributor

chris001 commented Apr 3, 2024

@ebsi-RBakade Would you make a new Pull Request (referencing this Issue number) with the edited file, for review, test, and if approved, add to app.

@ebsi-RBakade ebsi-RBakade reopened this Apr 4, 2024
@ebsi-RBakade
Copy link
Author

ebsi-RBakade commented Apr 4, 2024

@chris001
I have reopened this Bug. Please take a look.

@johnM2401
Copy link
Contributor

johnM2401 commented Apr 9, 2024

Hey @ebsi-RBakade !
Thank you for getting in touch!

I've given this a try on the latest version, with:
SuiteCRM 7.14.3
PHP 8.2

and this appears to be working as expected.

Have I perhaps missed something in replication?

I'm attempting:

  • Create a new Case
  • Assign it to a user other than myself
  • See that the user recieves an Email
    My selected user does get the assignment mail:
    image
    image

I see from your issue that you're using SuiteCRM 7.4.3 and PHP 5.3
Is this correct?
If so, would you be able to try on a more recent version of SuiteCRM & supported PHP version and let us know if you are still able to replicate this issue?


You also mention:
"email is received without contact and and case number."
However, I don't believe the OOTB Record Assignment Email contains this information. (See screenshot above)
Do you perhaps have a custom assignment template?
Or are you referring to another feature?

Thanks!

@johnM2401 johnM2401 added the Status:Requires Updates Issues & PRs which requires input or update from the author label Apr 9, 2024
@ebsi-RBakade
Copy link
Author

ebsi-RBakade commented Apr 17, 2024

@johnM2401
thanks for that Input. I confirmed that contact name and case number are the custom field added in the email template at data/SugarBean.php file inside create_notification_email() function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status:Requires Updates Issues & PRs which requires input or update from the author
Projects
None yet
Development

No branches or pull requests

3 participants