[Bps-public-commit] RT-Extension-MandatoryOnTransition branch, localize-update-field-overrides, created. 0.09_01-3-g7d4f83d
Todd Wade
todd at bestpractical.com
Thu Oct 1 19:08:15 EDT 2015
The branch, localize-update-field-overrides has been created
at 7d4f83d72b39ab543894dc7bda7e9d68542bb420 (commit)
- Log -----------------------------------------------------------------
commit 7d4f83d72b39ab543894dc7bda7e9d68542bb420
Author: Todd Wade <todd at bestpractical.com>
Date: Thu Oct 1 19:05:47 2015 -0400
localize field overrides so they revert to their previous values
The Modify.html and ModifyAll.html callbacks were overiding global variable
values which was breaking the mandatory validation the next time that
process did validation on the Update.html page. This change local()izes the
value changes so they revert by the time the request is finished.
diff --git a/html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Modify.html/Default b/html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Modify.html/Default
index 91451b5..f4cfa34 100644
--- a/html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Modify.html/Default
+++ b/html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Modify.html/Default
@@ -1,7 +1,7 @@
<%INIT>
# CORE_FOR_UPDATE assumes that any update to a Ticket is coming from Update.html
# which calls TimeWorked UpdateTimeWorked
-$RT::Extension::MandatoryOnTransition::CORE_FOR_UPDATE{TimeWorked} = "TimeWorked";
-$RT::Extension::MandatoryOnTransition::CORE_FOR_UPDATE{TimeTaken} = "TimeWorked";
+local $RT::Extension::MandatoryOnTransition::CORE_FOR_UPDATE{TimeWorked} = "TimeWorked";
+local $RT::Extension::MandatoryOnTransition::CORE_FOR_UPDATE{TimeTaken} = "TimeWorked";
</%INIT>
<& /Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Update.html/BeforeUpdate, %ARGS &>
diff --git a/html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/ModifyAll.html/Default b/html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/ModifyAll.html/Default
index 43b0258..40f91d6 100644
--- a/html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/ModifyAll.html/Default
+++ b/html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/ModifyAll.html/Default
@@ -3,7 +3,7 @@
# which calls TimeWorked UpdateTimeWorked
# Luckily - while Jumbo contains a Content box, it's called UpdateContent like Update.html, rather than
# Content like Create.html.
-$RT::Extension::MandatoryOnTransition::CORE_FOR_UPDATE{TimeWorked} = "TimeWorked";
-$RT::Extension::MandatoryOnTransition::CORE_FOR_UPDATE{TimeTaken} = "TimeWorked";
+local $RT::Extension::MandatoryOnTransition::CORE_FOR_UPDATE{TimeWorked} = "TimeWorked";
+local $RT::Extension::MandatoryOnTransition::CORE_FOR_UPDATE{TimeTaken} = "TimeWorked";
</%INIT>
<& /Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Update.html/BeforeUpdate, %ARGS &>
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list