We introduce the ability to assign tickets/concerns to users in bug 35657 but we don't trigger a notification for that assigned user. We should add the option to send a notice to the new assignee when you are not assigning to yourself.
Created attachment 166316 [details] [review] Bug 36758: Add TICKET_ASSIGNED notice This patch adds a new default TICKET_ASSIGNED notice to be used with catalog concerns to notice the assigned staff user when a ticket has been assigned to them. Test plan 1) Run the database update and confirm that the new notice has been added to the database (If on the sandboxes, skip to the next patch)
Created attachment 166317 [details] [review] Bug 36758: Add librarian object This patch adds a 'librarian' object fetch to C4::Letters::GetPreparedLetter when a called passes the 'want_librarian' flag. This allows for the notice to take full advantage of the patron object for that librarian rather than requireing old non-TT syntax for this feature. Test plan 1) We use the 'librarian' object in the new TICKET_ASSIGNED default notice, use the next patch to test that the librarian title is correctly substituted into the notice.
Created attachment 166318 [details] [review] Bug 36758: Unit tests for assignee notification trigger This patch adds unit tests for the TICKET_ASSIGNED trigger being introduced with this patchset. Test plan 1) Run the unit tests prior to the next patch and confirm they fail 2) Apply the next patch and confirm the unit tests now pass
Created attachment 166319 [details] [review] Bug 36758: Add trigger for assignee notification trigger This patch adds a new notice trigger to allow notifying assigned staff that they have been assigned a new catalog concern to action. Test plan 1) Enable catalog concerns (either via staff or opac interfaces) 2) Report a new concern (either via staff or opac interfaces) 3) As a staff user, assign the concern to another staff user 4) Check that the new 'TICKET_ASSIGNED' notice has be queued for that staff user. 5) Re-assign the catalog concern to yourself 6) Note that you do not see a 'TICKET_ASSIGNED@ notice queued as you self-assigned.
Note to RM.. I introduce a new feature to C4::Letters::GetPreparedLetter in here (see 'Add librarian object'). It's perhaps wise to split this into it's own bug, but it's simplest to test inline here. Let me know if you'd like it split out as it will inevitably be very helpful in the transition to TT notices everywhere.
Created attachment 166390 [details] [review] Bug 36758: Add TICKET_ASSIGNED notice This patch adds a new default TICKET_ASSIGNED notice to be used with catalog concerns to notice the assigned staff user when a ticket has been assigned to them. Test plan 1) Run the database update and confirm that the new notice has been added to the database (If on the sandboxes, skip to the next patch) Signed-off-by: David Nind <david@davidnind.com>
Created attachment 166391 [details] [review] Bug 36758: Add librarian object This patch adds a 'librarian' object fetch to C4::Letters::GetPreparedLetter when a called passes the 'want_librarian' flag. This allows for the notice to take full advantage of the patron object for that librarian rather than requireing old non-TT syntax for this feature. Test plan 1) We use the 'librarian' object in the new TICKET_ASSIGNED default notice, use the next patch to test that the librarian title is correctly substituted into the notice. Signed-off-by: David Nind <david@davidnind.com>
Created attachment 166392 [details] [review] Bug 36758: Unit tests for assignee notification trigger This patch adds unit tests for the TICKET_ASSIGNED trigger being introduced with this patchset. Test plan 1) Run the unit tests prior to the next patch and confirm they fail 2) Apply the next patch and confirm the unit tests now pass Signed-off-by: David Nind <david@davidnind.com>
Created attachment 166393 [details] [review] Bug 36758: Add trigger for assignee notification trigger This patch adds a new notice trigger to allow notifying assigned staff that they have been assigned a new catalog concern to action. Test plan 1) Enable catalog concerns (either via staff or opac interfaces) 2) Report a new concern (either via staff or opac interfaces) 3) As a staff user, assign the concern to another staff user 4) Check that the new 'TICKET_ASSIGNED' notice has be queued for that staff user. 5) Re-assign the catalog concern to yourself 6) Note that you do not see a 'TICKET_ASSIGNED@ notice queued as you self-assigned. Signed-off-by: David Nind <david@davidnind.com>