[Bps-public-commit] RT-Extension-MandatoryOnTransition branch, simplifyCondition, created. 0.18-1-g099c7a4

Michel Rodriguez michel at bestpractical.com
Fri Apr 5 14:19:41 EDT 2019


The branch, simplifyCondition has been created
        at  099c7a41457b62cb210c701d2cc27b021fdcad6c (commit)

- Log -----------------------------------------------------------------
commit 099c7a41457b62cb210c701d2cc27b021fdcad6c
Author: michel <michel at bestpractical.com>
Date:   Fri Apr 5 14:29:11 2019 +0200

    simplified condition matching @CORE_SUPPORTED fields
    None of the @CORE_SUPPORTED fields matches CF\.
    So checking that a field is in @CORE_SUPPORTED is enough, all
    CF. fields are filtered out by that condition alone.
    I would think none will in the future since by definition they
    are internal fields (Content TimeWorked TimeTaken...) and not
    custom ones, no need to check that their name doesn't start
    with CF\..

diff --git a/lib/RT/Extension/MandatoryOnTransition.pm b/lib/RT/Extension/MandatoryOnTransition.pm
index 97bf52c..53209f2 100644
--- a/lib/RT/Extension/MandatoryOnTransition.pm
+++ b/lib/RT/Extension/MandatoryOnTransition.pm
@@ -360,7 +360,7 @@ sub RequiredFields {
 
     my %core_supported = map { $_ => 1 } @CORE_SUPPORTED;
 
-    my @core = grep { !/^CF\./i && $core_supported{$_} } @$required;
+    my @core = grep { $core_supported{$_} } @$required;
     my @cfs  =  map { /^CF\.(.+)$/i; $1; }
                grep { /^CF\./i } @$required;
     my @roles = map { /^(:?[CustomRole\.]?.+)$/i; $1; }

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


More information about the Bps-public-commit mailing list