[Rt-commit] rt branch, 5.0/lifecycle-ui-mappings-fixes, created. rt-5.0.0-64-g555b8ccd0f

Craig Kaiser craig at bestpractical.com
Wed Oct 28 14:56:14 EDT 2020


The branch, 5.0/lifecycle-ui-mappings-fixes has been created
        at  555b8ccd0fde7f91ea42aba961c6401742d1ee71 (commit)

- Log -----------------------------------------------------------------
commit e6a14eef451c55dcf485d12ced40517a1e183571
Author: craig kaiser <craig at bestpractical.com>
Date:   Tue Sep 15 11:23:03 2020 -0400

    Add 'enctype=multipart/form-data' to custom field inline edit form
    
    Without this form attribute, when submitting a file for a custom field
    the browser will complain:
    
    Form contains a file input, but is missing method=POST and enctype=multipart/form-data
    on the form. The file will not be sent.

diff --git a/share/html/Elements/ShowCustomFieldCustomGroupings b/share/html/Elements/ShowCustomFieldCustomGroupings
index 9b6876042c..ee3c1af60c 100644
--- a/share/html/Elements/ShowCustomFieldCustomGroupings
+++ b/share/html/Elements/ShowCustomFieldCustomGroupings
@@ -92,7 +92,7 @@ for my $group ( @Groupings ) {
   </div>
 % }
 % if ($modify_behavior ne 'hide') {
-  <form class="inline-edit" action="<%RT->Config->Get('WebPath')%>/Ticket/Display.html" method="post">
+  <form class="inline-edit" action="<%RT->Config->Get('WebPath')%>/Ticket/Display.html" method="post" enctype="multipart/form-data">
     <input type="hidden" class="hidden" name="id" value="<% $Object->id %>" />
     <& /Elements/EditCustomFields, Object => $Object, Grouping => $group, InTable => 0 &>
     <div class="form-row">
diff --git a/share/html/Ticket/Elements/ShowSummary b/share/html/Ticket/Elements/ShowSummary
index 760664df74..7bdac31843 100644
--- a/share/html/Ticket/Elements/ShowSummary
+++ b/share/html/Ticket/Elements/ShowSummary
@@ -74,7 +74,7 @@ my $modify_behavior = $InlineEdit ? ($inline_edit_behavior{Basics} || $inline_ed
             </div>
 %       }
 %       if ($modify_behavior ne 'hide') {
-            <form class="inline-edit" action="<%RT->Config->Get('WebPath')%>/Ticket/Display.html" method="post">
+            <form class="inline-edit" action="<%RT->Config->Get('WebPath')%>/Ticket/Display.html" method="post" enctype="multipart/form-data">
                 <input type="hidden" class="hidden" name="id" value="<% $Ticket->id %>" />
                 <& /Ticket/Elements/EditBasics, TicketObj => $Ticket, InTable => 1, ExcludeOwner => 1, ExcludeCustomRoles => 1 &>
                 <& /Elements/EditCustomFields, Object => $Ticket, Grouping => 'Basics', InTable => 1 &>

commit e2599462619d70a563acc992a5bc3c0f4321a5e6
Author: craig kaiser <craig at bestpractical.com>
Date:   Wed Oct 28 14:35:42 2020 -0400

    Limit mappings status dropdowns to respective lifecycle
    
    Previously all statuses were available to choose from when really we
    should only be able to choose from the valid statuses of the "To"
    lifecycle we are mapping to.

diff --git a/share/html/Admin/Lifecycles/Mappings.html b/share/html/Admin/Lifecycles/Mappings.html
index 0da577941b..8aa8c21530 100644
--- a/share/html/Admin/Lifecycles/Mappings.html
+++ b/share/html/Admin/Lifecycles/Mappings.html
@@ -63,7 +63,6 @@
 % my $FromMapping = $Other->MoveMap($LifecycleObj);
 % my $ToMapping = $LifecycleObj->MoveMap($Other);
 % my @OtherStatuses = $Other->Valid;
-
 <&| /Widgets/TitleBox, title => $Other->Name &>
   <div class="form-row">
     <div class="col-6">
@@ -74,7 +73,7 @@
           <% $OtherStatus %>:
         </div>
         <div class="col-8 value">
-          <& /Elements/SelectStatus, Statuses => \@MyStatuses, Default => $FromMapping->{$OtherStatus}, Name => 'map-' . $Other->Name . '-' . $OtherStatus . '--' . $LifecycleObj->Name&>
+          <& /Elements/SelectStatus, Lifecycles => [$LifecycleObj], Default => $FromMapping->{$OtherStatus}, Name => 'map-' . $Other->Name . '-' . $OtherStatus . '--' . $LifecycleObj->Name &>
         </div>
       </div>
 % }
@@ -88,7 +87,7 @@
           <% $MyStatus %>:
         </div>
         <div class="col-8 value">
-          <& /Elements/SelectStatus, Statuses => \@OtherStatuses, Default => $ToMapping->{$MyStatus}, Name => 'map-' . $LifecycleObj->Name . '-' . $MyStatus . '--' . $Other->Name &>
+          <& /Elements/SelectStatus, Lifecycles => [$Other], Default => $ToMapping->{$MyStatus}, Name => 'map-' . $LifecycleObj->Name . '-' . $MyStatus . '--' . $Other->Name &>
         </div>
       </div>
 % }

commit 555b8ccd0fde7f91ea42aba961c6401742d1ee71
Author: craig kaiser <craig at bestpractical.com>
Date:   Wed Oct 28 14:50:18 2020 -0400

    Update instructions for lifecycle mapping page to mention assets

diff --git a/share/html/Admin/Lifecycles/Mappings.html b/share/html/Admin/Lifecycles/Mappings.html
index 8aa8c21530..31315c08b9 100644
--- a/share/html/Admin/Lifecycles/Mappings.html
+++ b/share/html/Admin/Lifecycles/Mappings.html
@@ -50,7 +50,7 @@
 <& /Elements/ListActions, actions => \@results &>
 <div class="form-row">
   <div class="col-12">
-    <p><&|/l&>If a ticket is moved from one queue or catalog to another, these mappings define how statuses should be updated.</&></p>
+    <p><&|/l&>If a ticket or asset is moved from one queue or catalog to another, these mappings define how statuses should be updated.</&></p>
   </div>
 </div>
 

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


More information about the rt-commit mailing list