[Rt-commit] rt branch, 4.6/lifecycle-ui-dev, repushed

Craig Kaiser craig at bestpractical.com
Wed Feb 26 14:59:02 EST 2020


The branch 4.6/lifecycle-ui-dev was deleted and repushed:
       was 28bb7dc39d9d18538399dc34fcb6ddcfaf2078fb
       now 0fb30a3025f5e109f73a69d0ef96652b875864d2

 1: 5efbb8d77 !  1: bcbef5b8a Core lifecycle-UI
    @@ -202,7 +202,6 @@
     +        );
     +        return ($ok, $msg) if !$ok;
     +    }
    -+    RT->System->LifecycleCacheNeedsUpdate(1);
     +
     +    return 1;
     +}
 2: 7a6e45226 =  2: d9e6ba9c0 Use RT::Configuration to store lifecycle config instead of RT::Attribute
 3: 1d92f10f0 =  3: 5d6ddbc25 Migrate lifecycle UI pages to elevator theme
 4: c1c6bd175 =  4: d7ee8a9f3 Ensure lifecycle cache is updated across threads when flagged
 5: 1d979ae51 =  5: 6adda0c9f Add lifecycle UI Advanced page
 6: 6fa18d46f =  6: f116a2e8f Add lifecycle UI Actions page
 7: 0ee00a275 =  7: 6ba6d1da6 Add lifecycle UI Rights page
 8: 2cad9fdf1 =  8: c535bab62 Add lifecycle Rights/Actions/Advanced pages to menu
 9: 8edf83e4f =  9: 41006367d Increase column size on lifecycle mappings page
10: c8d9e4aaf = 10: 9d4a46221 Allow for lifecycle to be set to disabled
11: b7e4de1bd = 11: 4c5661611 Add 'remove' checkbox for lifecycle rights and actions page"
12: c68ffb4d3 < --:  ------- If no lifecycles configuration exists we need to load lifecycles from RT::Config
13: c4a3f9a2b ! 12: 622c4bf0c Only check if status needs to be removed from maps if we are updating one lifecycle
    @@ -1,6 +1,6 @@
     Author: Craig Kaiser <craig at bestpractical.com>
     
    -    If no lifecycles configuration exists we need to load lifecycles from RT::Config
    +    Only check if status needs to be removed from maps if we are updating one lifecycle
     
     diff --git a/lib/RT/Lifecycle.pm b/lib/RT/Lifecycle.pm
     --- a/lib/RT/Lifecycle.pm
    @@ -11,7 +11,7 @@
          my $CurrentUser = $args{CurrentUser};
     -    my $name = $args{LifecycleObj}->Name;
     -    my $lifecycles = RT->Config->Get('Lifecycles');
    -+    my $lifecycles  = RT::Lifecycle->Lifecycles;
    ++    my $lifecycles  = RT->Config->Get( "Lifecycles" );
      
     -    %{$lifecycles->{$name}} = (
     -        %{$lifecycles->{$name}},
    @@ -71,66 +71,3 @@
      
      sub UpdateMaps {
     
    -diff --git a/share/html/Admin/Lifecycles/index.html b/share/html/Admin/Lifecycles/index.html
    ---- a/share/html/Admin/Lifecycles/index.html
    -+++ b/share/html/Admin/Lifecycles/index.html
    -@@
    - <%INIT>
    - my @results;
    - 
    --my %lifecycles = ();
    -+my %lifecycles = %{RT::Lifecycle->Lifecycles};
    - 
    --my $setting = RT::Configuration->new($session{'CurrentUser'});
    --$setting->Load('Lifecycles');
    --if ( $setting->Id ) {
    --    %lifecycles = %{$setting->_DeserializeContent( $setting->Content )};
    --}
    --else {
    --    %lifecycles = RT::Config->Get( "Lifecycles" );
    --}
    - if ( $Submit ) {
    -     foreach my $lifecycle ( keys %lifecycles ) {
    -         next if grep { $lifecycle eq $_ } qw/approvals __maps__/;
    -@@
    -         }
    -     }
    - 
    --    if ( $setting->Id ) {
    --      my ($ret, $msg) = $setting->SetContent( \%lifecycles );
    --      if ( $ret ) {
    --          RT::Logger->debug( "Updated lifecycle configuration content" );
    --          RT::System->LifecycleCacheNeedsUpdate(1);
    --      }
    --      else {
    --          RT::Logger->error( "Could not set lifeycle configuration content: $msg" );
    --      }
    --    }
    --    else {
    --      my ($ret, $msg) = $setting->Create(
    --          Name        => 'Lifecycles',
    --          Content     => \%lifecycles,
    --          ContentType => 'perl',
    --      );
    --      if ( $ret ) {
    --          RT::Logger->debug("Creating lifecycles configuration");
    --      }
    --      else {
    --          RT::Logger->debug("Could not create lifecycles configuration: $msg" );
    --      }
    --    }
    -+    my ($ret, $msg) = RT::Lifecycle->UpdateLifecycle(
    -+        CurrentUser    => $session{CurrentUser},
    -+        NewConfig      => \%lifecycles,
    -+    );
    -+    if ( $ret ) {
    -+      RT::Logger->debug( "Updated lifecycle configuration content" );
    -+      RT::System->LifecycleCacheNeedsUpdate(1);
    -+  }
    -+  else {
    -+      RT::Logger->error( "Could not set lifeycle configuration content: $msg" );
    -+  }
    - }
    - 
    - # This code does automatic redirection if any updates happen.
    -
--:  ------- > 13: 641b490bc Make changes to lifecycle Configuration in context of current user
--:  ------- > 14: 7e42eb7da Ensure lifecycle cache is flagged for updating on rights and actions change
--:  ------- > 15: f54de048a Use standard update lifecycle method on index page
14: 841120f48 = 16: 972f735c0 Allow for spaces in actions key
15: 28bb7dc39 < --:  ------- Set Defaults section of lifecycle config if no other values are available
--:  ------- > 17: 0f119f7ce Set sensible default value for "on_create" if not provided
--:  ------- > 18: c1b19d79a Do not re-load displayed config value if lifecycle fails validation
--:  ------- > 19: d09c2b3cc Remove unused code
--:  ------- > 20: f99c3b24b Convert node name checks and transitions to lowercase
--:  ------- > 21: ea263be68 Ensure we flag the lifecycle cache needs updating on lifecycle save
--:  ------- > 22: f3f9df9e8 Skip warning if unecessary default key is not provided
--:  ------- > 23: 0fb30a302 Validate the lifecycle submitted on the Modify page before saving



More information about the rt-commit mailing list