[Bps-public-commit] RT-Extension-MandatoryOnTransition branch, master, updated. 0.04-1-g2058487

Ruslan Zakirov ruz at bestpractical.com
Thu Jun 13 05:42:33 EDT 2013


The branch, master has been updated
       via  2058487231a460e6c2fa94e69b85b6f1ab449260 (commit)
      from  02e2ad23dd48527bd918bb1104e254a8569160a0 (commit)

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

- Log -----------------------------------------------------------------
commit 2058487231a460e6c2fa94e69b85b6f1ab449260
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Wed Jun 12 14:22:45 2013 +0400

    if no CFs were listed as mandatory then all were mandatory
    
    For example the following config were causing all CFs to
    be mandatory:
    
        'Tech Support' => {
             '* -> resolved' => [ 'TimeWorked', 'TimeTaken', 'Content' ],
        },
    
    Thanks to David Prangnell and Josh Jenkins.

diff --git a/lib/RT/Extension/MandatoryOnTransition.pm b/lib/RT/Extension/MandatoryOnTransition.pm
index 7e36f68..854dfa8 100644
--- a/lib/RT/Extension/MandatoryOnTransition.pm
+++ b/lib/RT/Extension/MandatoryOnTransition.pm
@@ -356,6 +356,8 @@ sub CheckMandatoryFields {
                                      $label, $ARGSRef->{Status});
     }
 
+    return \@errors unless @$cfs;
+
     if ( not $CFs ){
         $RT::Logger->error("Custom Fields object required to process mandatory custom fields");
         return \@errors;

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



More information about the Bps-public-commit mailing list