[Rt-commit] rt 02/02: Do not run ValidateLifecycle on disabled lifecycles

craig kaiser craig at bestpractical.com
Fri Jul 16 15:39:40 UTC 2021


This is an automated email from the git hooks/post-receive script.

craig pushed a commit to branch 5.0/lifecycle-status-accents
in repository rt.

commit 5358023b71db6d0428431e07656cbee1f7ee3d30
Author: craig kaiser <craig at bestpractical.com>
AuthorDate: Fri Jul 16 11:33:36 2021 -0400

    Do not run ValidateLifecycle on disabled lifecycles
    
    A lifecycle should not be validated if it is disabled as lifecycles at
    the moment cannnot be deleted, only disabled.
---
 lib/RT/Lifecycle.pm | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/lib/RT/Lifecycle.pm b/lib/RT/Lifecycle.pm
index 69fac0ba67..e35e5bd95c 100644
--- a/lib/RT/Lifecycle.pm
+++ b/lib/RT/Lifecycle.pm
@@ -666,9 +666,13 @@ sub FillCache {
             actions => [],
         };
 
-        my ( $ret, @warnings ) = $self->ValidateLifecycle(Lifecycle => $lifecycle, Name => $name);
-        unless ( $ret ) {
-            warn $_ for @warnings;
+        # Skip validating disabled lifecycles
+        my ( $ret, @warnings );
+        unless ( $lifecycle->{'disabled'} ) {
+            ( $ret, @warnings ) = $self->ValidateLifecycle(Lifecycle => $lifecycle, Name => $name);
+            unless ( $ret ) {
+                warn $_ for @warnings;
+            }
         }
 
         my @statuses;

-- 
To stop receiving notification emails like this one, please contact
sysadmin at bestpractical.com.


More information about the rt-commit mailing list