Mailing List Archive

rt branch 5.0/unify-BeforeActionList-callback-api created. rt-5.0.3-1-g4d2a5a6dd9
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".

The branch, 5.0/unify-BeforeActionList-callback-api has been created
at 4d2a5a6dd9109a7fedc2db2d7bd87c375db62577 (commit)

- Log -----------------------------------------------------------------
commit 4d2a5a6dd9109a7fedc2db2d7bd87c375db62577
Author: Brian Conry <bconry@bestpractical.com>
Date: Wed Aug 3 15:37:45 2022 -0500

Unify the BeforeActionList Callback API

Two instances of the BeforeActionList Callback were missing the Actions
parameter.

This change adds the parameter on the calling side. Implementations of
the callback will be unaffected by the addition of the new parameter,
but they now have the option of modifying the list of user-reported
messages in /Ticket/Reminders.html and /Ticket/Update.html the same as
they already can in /Ticket/ModifyLinks.html, /Ticket/ModifyAll.html,
/Ticket/ModifyDates.html, /Ticket/Modify.html, /Ticket/Display.html,
/Ticket/ModifyPeople.html, and /Ticket/Forward.html.

diff --git a/share/html/Ticket/Reminders.html b/share/html/Ticket/Reminders.html
index 953130f853..7248fd8778 100644
--- a/share/html/Ticket/Reminders.html
+++ b/share/html/Ticket/Reminders.html
@@ -48,7 +48,7 @@
<& /Elements/Header, Title => loc("Reminders for ticket #[_1]: [_2]", $Ticket->Id, $Ticket->Subject) &>
<& /Elements/Tabs &>

-% $m->callback(CallbackName => 'BeforeActionList', ARGSRef => \%ARGS, Ticket => $Ticket);
+% $m->callback(CallbackName => 'BeforeActionList', ARGSRef => \%ARGS, Ticket => $Ticket, Actions => \@actions);

<& /Elements/ListActions, actions => \@actions &>

diff --git a/share/html/Ticket/Update.html b/share/html/Ticket/Update.html
index 315cb9838d..0c58f87bfa 100644
--- a/share/html/Ticket/Update.html
+++ b/share/html/Ticket/Update.html
@@ -48,7 +48,7 @@
<& /Elements/Header, Title => $title &>
<& /Elements/Tabs &>

-% $m->callback(CallbackName => 'BeforeActionList', ARGSRef => \%ARGS, Ticket => $TicketObj);
+% $m->callback(CallbackName => 'BeforeActionList', Actions => \@results, ARGSRef => \%ARGS, Ticket => $TicketObj);
<& /Elements/ListActions, actions => \@results &>

<div>

-----------------------------------------------------------------------


hooks/post-receive
--
rt
_______________________________________________
rt-commit mailing list
rt-commit@lists.bestpractical.com
https://lists.bestpractical.com/mailman/listinfo/rt-commit