[Bps-public-commit] RT-Extension-MandatoryOnTransition branch, master, updated. 0.14-6-gfbf1a87

Brian Duggan brian at bestpractical.com
Fri May 5 08:20:22 EDT 2017


The branch, master has been updated
       via  fbf1a8769c3e5e6058808ec31de2d486802d2d8d (commit)
      from  11a828efc30a096af2cb2cfd7a7d00af86a6f5ab (commit)

Summary of changes:
 lib/RT/Extension/MandatoryOnTransition.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

- Log -----------------------------------------------------------------
commit fbf1a8769c3e5e6058808ec31de2d486802d2d8d
Author: Brian C. Duggan <brian at dugga.net>
Date:   Fri May 5 08:19:02 2017 -0400

    Test existence of SubmitTicket form field before use
    
    Ticket creation forms don't use the SubmitTicket field. Test for this
    field's existence before testing its value.

diff --git a/lib/RT/Extension/MandatoryOnTransition.pm b/lib/RT/Extension/MandatoryOnTransition.pm
index b59de6c..509ad80 100644
--- a/lib/RT/Extension/MandatoryOnTransition.pm
+++ b/lib/RT/Extension/MandatoryOnTransition.pm
@@ -436,7 +436,7 @@ sub CheckMandatoryFields {
     # then set the form field name for Time Worked to 'TimeWorked' in
     # our local copy of %CORE_FOR_UPDATE
     my %CORE_FOR_UPDATE_COPY = %CORE_FOR_UPDATE;
-    if ( $ARGSRef->{'SubmitTicket'} eq 'Save Changes' ) {
+    if ( exists $ARGSRef->{'SubmitTicket'} && $ARGSRef->{'SubmitTicket'} eq 'Save Changes' ) {
         $CORE_FOR_UPDATE_COPY{'TimeWorked'} = 'TimeWorked';
         $CORE_FOR_UPDATE_COPY{'TimeTaken'} = 'TimeWorked';
     }

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


More information about the Bps-public-commit mailing list