Notify User on Update

9 years 5 months ago #1 by qask
Notify User on Update was created by qask
Hi
I use the Issue Tracker and everything works fine, except the user notification on update. the admin gets an email when someone creates, updates or closes an issue, but the user who created the issue only gets one after creating and closing the issue, not on update. The "Notify User on Update" is activated.

It would be great if someone could help.

Please Log in or Create an account to join the conversation.

9 years 5 months ago - 9 years 5 months ago #2 by chrisc
Replied by chrisc on topic Notify User on Update
I recently found a possible problem similar to that you describe. I will provide the fix below, but it may or may not be the problem you are seeing. If it doesn't then I will need a few more details about the 'specific user' not recieving the updates, such as whether they are 'registered' or guest users. If guest users are they identified by an entry in the 'it_people' table or by the details stored in the progress history?

In the file admin/components/com_issuetracker/helpers/issuetracker.php around line 1196 there is some code that looks like the following:
// If raising user is assignee do not notify user.
                  if ( $ass_upd_notify && (! empty($data['assigned_to_person_id']) ) ) {
                     // Notify User only if user and assignee are not the same.
                     $ident_id = self::get_itpeople_id($data['assigned_to_person_id']);

                     if ( $data['identified_by_person_id'] != $ident_id && ($usr_email[0] == 1 ) )
                        self::send_email('user_update', $usr_email[1], $data);   // Notify user
                  }

Change it to the following:
// If raising user is assignee do not notify user.
                  if ( $usr_upd_notify && (! empty($data['assigned_to_person_id']) ) ) {
                     // Notify User only if user and assignee are not the same.
                     $ident_id = self::get_itpeople_id($data['assigned_to_person_id']);

                     if ( $data['identified_by_person_id'] != $ident_id && ($usr_email[0] == 1 ) )
                        self::send_email('user_update', $usr_email[1], $data);   // Notify user
                  }
It is the second line ' if' statement that is changed. ie $ass_upd_notify becomes $usr_upd_notify.

Regards

If you are using our extensions please leave a review at the JED: IP Mapping | Issue Tracker | JAudit | Password Control
The following user(s) said Thank You: qask

Please Log in or Create an account to join the conversation.

9 years 5 months ago #3 by qask
Replied by qask on topic Notify User on Update
Thanks for the fast answer.

unfortunately it didn' work :dry:
Only registered users are able to create new issues. I just wonder why they get create and close emails but no update emails. :blink:

Please Log in or Create an account to join the conversation.

9 years 5 months ago - 9 years 5 months ago #4 by chrisc
Replied by chrisc on topic Notify User on Update
They certainly should get update emails and the check happens in the code just modified.
The only think I can currently think of is that the specific issue hasn't got a person assigned to the issue? In that situation they would fall through the check and not send an email.

If this is the situation then the following code may help.

Instead of the earlier code around line 1196 you could try the following instead:
                  if ( $usr_upd_notify ) {
                     // If raising user is assignee do not notify user.
                     if (! empty($data['assigned_to_person_id']) ) {
                        // Notify User only if user and assignee are not the same.
                        $ident_id = self::get_itpeople_id($data['assigned_to_person_id']);

                        if ($data['identified_by_person_id'] != $ident_id && ($usr_email[0] == 1 ))
                           self::send_email('user_update', $usr_email[1], $data);   // Notify user
                     } else {
                        self::send_email('user_update', $usr_email[1], $data);   // Notify user
                     }
                  }

Regards

If you are using our extensions please leave a review at the JED: IP Mapping | Issue Tracker | JAudit | Password Control

Please Log in or Create an account to join the conversation.

9 years 5 months ago #5 by qask
Replied by qask on topic Notify User on Update
Yes that was the problem :woohoo:

Your first answer was the solution :)
After changing the code it just didn't work because there was no person assigned

Thank you very much!
The following user(s) said Thank You: chrisc

Please Log in or Create an account to join the conversation.

9 years 5 months ago - 9 years 5 months ago #6 by chrisc
Replied by chrisc on topic Notify User on Update
Thank you for the update, the last fix should resolve either situation. I originally posted 1.6.5 code, but I corrected it for 1.6.4.

I am currently working on 1.6.5 in this area any was originally getting myself confused.

Rest assured it is in the 1.6.5 code base now.

Regards

If you are using our extensions please leave a review at the JED: IP Mapping | Issue Tracker | JAudit | Password Control

Please Log in or Create an account to join the conversation.

Time to create page: 0.158 seconds
Go To Top

Joomla! Debug Console

Session

Profile Information

Memory Usage

Database Queries