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

? sunnavy sunnavy at bestpractical.com
Tue Apr 28 10:59:32 EDT 2020


The branch 5.0/lifecycle-ui was deleted and repushed:
       was e3c6ddb688306c55207dca2618a767a7bfb0a09c
       now 89d3a490f07debbc5214be6385094433e7a75cc9

 1: 6744abe48f =  1: 939eb04218 Core RT::Extension::LifecycleUI
--:  ------- >  2: d2253a575d Switch to semicolon as query param delimiter in MenuBuilder for lifecycle menus
 2: bcc438fbe6 !  3: 65c076ceec Migrate lifecycle UI pages to new elevator themes
    @@ -102,11 +102,14 @@
      <& /Elements/ListActions, actions => \@results &>
      
     -<form action="<%RT->Config->Get('WebPath')%>/Admin/Lifecycles/Mappings.html" name="ModifyMappings" method="post" enctype="multipart/form-data">
    +-<input type="hidden" class="hidden" name="Name" value="<% $LifecycleObj->Name %>" />
    +-<input type="hidden" class="hidden" name="Type" value="<% $LifecycleObj->Type %>" />
     +<form action="<%RT->Config->Get('WebPath')%>/Admin/Lifecycles/Mappings.html" name="ModifyMappings" method="post" enctype="multipart/form-data" class="mx-auto max-width-lg">
    - <input type="hidden" class="hidden" name="Name" value="<% $LifecycleObj->Name %>" />
    - <input type="hidden" class="hidden" name="Type" value="<% $LifecycleObj->Type %>" />
    - 
    -@@
    ++  <input type="hidden" class="hidden" name="Name" value="<% $LifecycleObj->Name %>" />
    ++  <input type="hidden" class="hidden" name="Type" value="<% $LifecycleObj->Type %>" />
    + 
    + % for my $Other (@lifecycles) {
    + % my $FromMapping = $Other->MoveMap($LifecycleObj);
      % my $ToMapping = $LifecycleObj->MoveMap($Other);
      % my @OtherStatuses = $Other->Valid;
      
 3: 24340bed37 =  4: 86f358ba4f Add POD doc for new added public methods
 4: 6230b37d38 =  5: 3b563551c6 Ensure lifecycle cache is updated across threads when flagged
 5: dfd731e4e0 =  6: 951e41ffa2 Add select/create links on all lifecycle admin pages like other objects
 6: bbf0b1591c =  7: 090c6908d9 Limit lifecycle admin pages only to superusers
 7: b2b62c11c2 !  8: 9ec185ff25 Support to disable lifecycles
    @@ -1,6 +1,8 @@
     Author: Craig Kaiser <craig at bestpractical.com>
     
         Support to disable lifecycles
    +    
    +    Active ones are not allowed to be disabled.
     
     diff --git a/lib/RT/Lifecycle.pm b/lib/RT/Lifecycle.pm
     --- a/lib/RT/Lifecycle.pm
    @@ -113,8 +115,19 @@
     +            }
     +        }
     +        elsif ( !$lifecycles{$lifecycle}{'disabled'} ) {
    -+            $lifecycles{$lifecycle}{'disabled'} = 1;
    -+            $changed ||= 1;
    ++            my $class = ( $lifecycles{$lifecycle}{'type'} // '' ) eq 'asset' ? 'RT::Catalogs' : 'RT::Queues';
    ++            my $objects = $class->new($session{CurrentUser});
    ++            $objects->Limit( FIELD => 'Lifecycle', VALUE => $lifecycle );
    ++            my $names = join ', ', map { $_->Name } @{ $objects->ItemsArrayRef };
    ++            if ( $names ) {
    ++                push @results,
    ++                    loc( "Could not disable active lifecycle [_1]: it is used by [_2] [_3]",
    ++                    $lifecycle, lc $class->Table, $names );
    ++            }
    ++            else {
    ++                $lifecycles{$lifecycle}{'disabled'} = 1;
    ++                $changed ||= 1;
    ++            }
     +        }
     +    }
     +
 8: c232abd197 =  9: 4e8e706ff2 Add d3.js to RT
 9: 8c8f1d0fe0 = 10: 0128707d65 Abstract ValidateLifecycle and ValidateLifecycleMaps from FillCache
10: f5f9b682b9 = 11: b214374bac New lifecycle editor based on original extension and Craig's big refactor
11: 369f816e72 ! 12: 5e768c0c39 Add lifecycle UI Advanced page
    @@ -7,9 +7,9 @@
     +++ b/lib/RT/Interface/Web/MenuBuilder.pm
     @@
      
    -                 $page->child( basics => title => loc('Modify'),  path => "/Admin/Lifecycles/Modify.html?Type=" . $Type_uri . "&Name=" . $Name_uri );
    -                 $page->child( mappings => title => loc('Mappings'),  path => "/Admin/Lifecycles/Mappings.html?Type=" . $Type_uri . "&Name=" . $Name_uri );
    -+                $page->child( advanced => title => loc('Advanced'),  path => "/Admin/Lifecycles/Advanced.html?Type=" . $Type_uri . "&Name=" . $Name_uri );
    +                 $page->child( basics => title => loc('Modify'),  path => "/Admin/Lifecycles/Modify.html?Type=" . $Type_uri . ";Name=" . $Name_uri );
    +                 $page->child( mappings => title => loc('Mappings'),  path => "/Admin/Lifecycles/Mappings.html?Type=" . $Type_uri . ";Name=" . $Name_uri );
    ++                $page->child( advanced => title => loc('Advanced'),  path => "/Admin/Lifecycles/Advanced.html?Type=" . $Type_uri . ";Name=" . $Name_uri );
                  }
              }
              else {
12: 7d93d9624a ! 13: da17b067f2 Add lifecycle UI Actions page
    @@ -8,10 +8,10 @@
     @@
                      RT::Interface::Web::EscapeURI(\$Type_uri);
      
    -                 $page->child( basics => title => loc('Modify'),  path => "/Admin/Lifecycles/Modify.html?Type=" . $Type_uri . "&Name=" . $Name_uri );
    -+                $page->child( actions => title => loc('Actions'), path => "/Admin/Lifecycles/Actions.html?Type=" . $Type_uri . "&Name=" . $Name_uri );
    -                 $page->child( mappings => title => loc('Mappings'),  path => "/Admin/Lifecycles/Mappings.html?Type=" . $Type_uri . "&Name=" . $Name_uri );
    -                 $page->child( advanced => title => loc('Advanced'),  path => "/Admin/Lifecycles/Advanced.html?Type=" . $Type_uri . "&Name=" . $Name_uri );
    +                 $page->child( basics => title => loc('Modify'),  path => "/Admin/Lifecycles/Modify.html?Type=" . $Type_uri . ";Name=" . $Name_uri );
    ++                $page->child( actions => title => loc('Actions'), path => "/Admin/Lifecycles/Actions.html?Type=" . $Type_uri . ";Name=" . $Name_uri );
    +                 $page->child( mappings => title => loc('Mappings'),  path => "/Admin/Lifecycles/Mappings.html?Type=" . $Type_uri . ";Name=" . $Name_uri );
    +                 $page->child( advanced => title => loc('Advanced'),  path => "/Admin/Lifecycles/Advanced.html?Type=" . $Type_uri . ";Name=" . $Name_uri );
                  }
     
     diff --git a/share/html/Admin/Lifecycles/Actions.html b/share/html/Admin/Lifecycles/Actions.html
13: 04c14a8208 ! 14: 19d17d3e6c Add lifecycle UI Rights page
    @@ -7,11 +7,11 @@
     +++ b/lib/RT/Interface/Web/MenuBuilder.pm
     @@
      
    -                 $page->child( basics => title => loc('Modify'),  path => "/Admin/Lifecycles/Modify.html?Type=" . $Type_uri . "&Name=" . $Name_uri );
    -                 $page->child( actions => title => loc('Actions'), path => "/Admin/Lifecycles/Actions.html?Type=" . $Type_uri . "&Name=" . $Name_uri );
    -+                $page->child( rights => title => loc('Rights'), path => "/Admin/Lifecycles/Rights.html?Type=" . $Type_uri . "&Name=" . $Name_uri );
    -                 $page->child( mappings => title => loc('Mappings'),  path => "/Admin/Lifecycles/Mappings.html?Type=" . $Type_uri . "&Name=" . $Name_uri );
    -                 $page->child( advanced => title => loc('Advanced'),  path => "/Admin/Lifecycles/Advanced.html?Type=" . $Type_uri . "&Name=" . $Name_uri );
    +                 $page->child( basics => title => loc('Modify'),  path => "/Admin/Lifecycles/Modify.html?Type=" . $Type_uri . ";Name=" . $Name_uri );
    +                 $page->child( actions => title => loc('Actions'), path => "/Admin/Lifecycles/Actions.html?Type=" . $Type_uri . ";Name=" . $Name_uri );
    ++                $page->child( rights => title => loc('Rights'), path => "/Admin/Lifecycles/Rights.html?Type=" . $Type_uri . ";Name=" . $Name_uri );
    +                 $page->child( mappings => title => loc('Mappings'),  path => "/Admin/Lifecycles/Mappings.html?Type=" . $Type_uri . ";Name=" . $Name_uri );
    +                 $page->child( advanced => title => loc('Advanced'),  path => "/Admin/Lifecycles/Advanced.html?Type=" . $Type_uri . ";Name=" . $Name_uri );
                  }
     
     diff --git a/share/html/Admin/Lifecycles/Rights.html b/share/html/Admin/Lifecycles/Rights.html
14: 6d47ffe34f = 15: a857a2fd6d Default on_create to the first initial status
15: ccbbb16f1e ! 16: e2675be97a Skip form and show hints if mapping is not needed
    @@ -11,8 +11,8 @@
      
     +% if ( @lifecycles ) {
      <form action="<%RT->Config->Get('WebPath')%>/Admin/Lifecycles/Mappings.html" name="ModifyMappings" method="post" enctype="multipart/form-data" class="mx-auto max-width-lg">
    - <input type="hidden" class="hidden" name="Name" value="<% $LifecycleObj->Name %>" />
    - <input type="hidden" class="hidden" name="Type" value="<% $LifecycleObj->Type %>" />
    +   <input type="hidden" class="hidden" name="Name" value="<% $LifecycleObj->Name %>" />
    +   <input type="hidden" class="hidden" name="Type" value="<% $LifecycleObj->Type %>" />
     @@
        </div>
      
16: 41c0500f77 ! 17: 4dc948e73e Redirect to Advanced page on lifecycle modify page for IE
    @@ -28,13 +28,13 @@
                      RT::Interface::Web::EscapeURI(\$Name_uri);
                      RT::Interface::Web::EscapeURI(\$Type_uri);
      
    --                $page->child( basics => title => loc('Modify'),  path => "/Admin/Lifecycles/Modify.html?Type=" . $Type_uri . "&Name=" . $Name_uri );
    +-                $page->child( basics => title => loc('Modify'),  path => "/Admin/Lifecycles/Modify.html?Type=" . $Type_uri . ";Name=" . $Name_uri );
     +                unless ( RT::Interface::Web->ClientIsIE ) {
    -+                    $page->child( basics => title => loc('Modify'),  path => "/Admin/Lifecycles/Modify.html?Type=" . $Type_uri . "&Name=" . $Name_uri );
    ++                    $page->child( basics => title => loc('Modify'),  path => "/Admin/Lifecycles/Modify.html?Type=" . $Type_uri . ";Name=" . $Name_uri );
     +                }
    -                 $page->child( actions => title => loc('Actions'), path => "/Admin/Lifecycles/Actions.html?Type=" . $Type_uri . "&Name=" . $Name_uri );
    -                 $page->child( rights => title => loc('Rights'), path => "/Admin/Lifecycles/Rights.html?Type=" . $Type_uri . "&Name=" . $Name_uri );
    -                 $page->child( mappings => title => loc('Mappings'),  path => "/Admin/Lifecycles/Mappings.html?Type=" . $Type_uri . "&Name=" . $Name_uri );
    +                 $page->child( actions => title => loc('Actions'), path => "/Admin/Lifecycles/Actions.html?Type=" . $Type_uri . ";Name=" . $Name_uri );
    +                 $page->child( rights => title => loc('Rights'), path => "/Admin/Lifecycles/Rights.html?Type=" . $Type_uri . ";Name=" . $Name_uri );
    +                 $page->child( mappings => title => loc('Mappings'),  path => "/Admin/Lifecycles/Mappings.html?Type=" . $Type_uri . ";Name=" . $Name_uri );
     
     diff --git a/share/html/Admin/Lifecycles/Advanced.html b/share/html/Admin/Lifecycles/Advanced.html
     --- a/share/html/Admin/Lifecycles/Advanced.html
17: e3c6ddb688 ! 18: 89d3a490f0 Add inline documentation to guide lifecycle users
    @@ -9,16 +9,19 @@
      <& /Admin/Elements/Header, Title => $title &>
      <& /Elements/Tabs &>
      <& /Elements/ListActions, actions => \@results &>
    --
    -+<p>Create actions that will appear in the Actions menu for tickets or assets.</p>
    -+<ul>
    -+  <li>From and To define the status transition.</li>
    -+  <li>Label is what users will see in the Actions menu.</li>
    -+  <li>Update type sets the default message type on the update page. Set to '-' to change status without showing the update page.</li>
    -+</ul>
    ++<div class="form-row">
    ++  <div class="col-md-12">
    ++    <p><&|/l&>Create actions that will appear in the Actions menu for tickets or assets.</&></p>
    ++    <ul>
    ++      <li><&|/l&>From and To define the status transition.</&></li>
    ++      <li><&|/l&>Label is what users will see in the Actions menu.</&></li>
    ++      <li><&|/l&>Update type sets the default message type on the update page. Set to '-' to change status without showing the update page.</&></li>
    ++    </ul>
    ++  </div>
    ++</div>
    + 
      <form action="<%RT->Config->Get('WebPath')%>/Admin/Lifecycles/Actions.html" name="ModifyLifecycleRights" method="post" enctype="multipart/form-data" class="mx-auto max-width-md">
        <input type="hidden" class="hidden" name="Name" value="<% $LifecycleObj->Name %>" />
    -   <input type="hidden" class="hidden" name="Type" value="<% $LifecycleObj->Type %>" />
     
     diff --git a/share/html/Admin/Lifecycles/Advanced.html b/share/html/Admin/Lifecycles/Advanced.html
     --- a/share/html/Admin/Lifecycles/Advanced.html
    @@ -27,11 +30,14 @@
      <& /Admin/Elements/Header, Title => $title &>
      <& /Elements/Tabs &>
      <& /Elements/ListActions, actions => \@results &>
    --
    -+<p>The advanced view gives you direct access to the full lifecycle configuration for advanced changes.</p>
    ++<div class="form-row">
    ++  <span class="col-md-12">
    ++    <p><&|/l&>The advanced view gives you direct access to the full lifecycle configuration for advanced changes.</&></p>
    ++  </span>
    ++</div>
    + 
      <form action="<%RT->Config->Get('WebPath')%>/Admin/Lifecycles/Advanced.html" name="ModifyLifecycleAdvanced" method="post" enctype="multipart/form-data" class="mx-auto max-width-sm">
        <input type="hidden" class="hidden" name="Name" value="<% $LifecycleObj->Name %>" />
    -   <input type="hidden" class="hidden" name="Type" value="<% $LifecycleObj->Type %>" />
     
     diff --git a/share/html/Admin/Lifecycles/Mappings.html b/share/html/Admin/Lifecycles/Mappings.html
     --- a/share/html/Admin/Lifecycles/Mappings.html
    @@ -40,24 +46,30 @@
      <& /Admin/Elements/Header, Title => $title &>
      <& /Elements/Tabs &>
      <& /Elements/ListActions, actions => \@results &>
    --
    -+<p>If a ticket is moved from one queue or catalog to another, these mappings define how statuses should be updated.</p>
    ++<div class="form-row">
    ++  <div class="col-md-12">
    ++    <p><&|/l&>If a ticket is moved from one queue or catalog to another, these mappings define how statuses should be updated.</&></p>
    ++  </div>
    ++</div>
    + 
      % if ( @lifecycles ) {
      <form action="<%RT->Config->Get('WebPath')%>/Admin/Lifecycles/Mappings.html" name="ModifyMappings" method="post" enctype="multipart/form-data" class="mx-auto max-width-lg">
    - <input type="hidden" class="hidden" name="Name" value="<% $LifecycleObj->Name %>" />
     
     diff --git a/share/html/Admin/Lifecycles/Modify.html b/share/html/Admin/Lifecycles/Modify.html
     --- a/share/html/Admin/Lifecycles/Modify.html
     +++ b/share/html/Admin/Lifecycles/Modify.html
     @@
    + <& /Admin/Elements/Header, Title => $title &>
    + <& /Elements/Tabs &>
    + <& /Elements/ListActions, actions => \@results &>
    ++<div class="form-row">
    ++  <div class="col-md-12">
    ++    <p><&|/l&>Create statuses for your lifecycle and define the transitions allowed between them.</&></p>
    ++  </div>
    ++</div>
    + 
      <script type="text/javascript" src="<%RT->Config->Get('WebPath')%>/static/js/d3.min.js"></script>
      <script type="text/javascript" src="<%RT->Config->Get('WebPath')%>/static/js/lifecycleui-model.js"></script>
    - <script type="text/javascript" src="<%RT->Config->Get('WebPath')%>/static/js/lifecycleui-editor.js"></script>
    --
    -+<p>Create statuses for your lifecycle and define the transitions allowed between them.</p>
    - <form action="<%RT->Config->Get('WebPath')%>/Admin/Lifecycles/Modify.html" name="ModifyLifecycle" method="post" enctype="multipart/form-data" class="mx-auto max-width-xl">
    -   <input type="hidden" class="hidden" name="Name" value="<% $Name %>" />
    -   <input type="hidden" class="hidden" name="Type" value="<% $Type %>" />
     
     diff --git a/share/html/Admin/Lifecycles/Rights.html b/share/html/Admin/Lifecycles/Rights.html
     --- a/share/html/Admin/Lifecycles/Rights.html
    @@ -66,11 +78,14 @@
      <& /Admin/Elements/Header, Title => $title &>
      <& /Elements/Tabs &>
      <& /Elements/ListActions, actions => \@results &>
    --
    -+<p>Define custom rights and apply them to status transitions. Once defined, these rights will appear on RT rights pages, like queue group rights, where you can assign them.</p>
    ++<div class="form-row">
    ++  <div class="col-md-12">
    ++    <p><&|/l&>Define custom rights and apply them to status transitions.  Once defined, these rights will appear on RT rights pages, like queue group rights, where you can assign them.</&></p>
    ++  </div>
    ++</div>
    + 
      <form action="<%RT->Config->Get('WebPath')%>/Admin/Lifecycles/Rights.html" name="ModifyLifecycleRights" method="post" enctype="multipart/form-data" class="mx-auto max-width-md">
        <input type="hidden" class="hidden" name="Name" value="<% $LifecycleObj->Name %>" />
    -   <input type="hidden" class="hidden" name="Type" value="<% $LifecycleObj->Type %>" />
     
     diff --git a/share/html/Elements/Lifecycle/Graph b/share/html/Elements/Lifecycle/Graph
     --- a/share/html/Elements/Lifecycle/Graph
    @@ -100,8 +115,7 @@
     +Click and drag a status node to <strong>change the graph layout</strong>.<br>
     +Control + click on a status and drag to another to <strong>add a transition</strong>.<br>
     +Click on a status node to select it and press 'd' to <strong>delete</strong>.<br>
    -+<strong>Click on a transition line</strong> to delete.<br>
    -+        </&>
    ++<strong>Click on a transition line</strong> to delete.<br></&>
            </p>
          </div>
        </div>



More information about the rt-commit mailing list