[Rt-commit] rt branch, 5.0/lifecycle-mapping-status-cases, created. rt-5.0.1-12-g1eaa408b95
? sunnavy
sunnavy at bestpractical.com
Mon Feb 22 14:38:18 EST 2021
The branch, 5.0/lifecycle-mapping-status-cases has been created
at 1eaa408b95c1f536033465e853844778f2b7f763 (commit)
- Log -----------------------------------------------------------------
commit 1eaa408b95c1f536033465e853844778f2b7f763
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Feb 23 03:03:02 2021 +0800
Make statuses having upper cased chars work on lifecycle mappings page
Statuses are converted to lower case automatically in "__maps__" of
%RT::Lifecycle::LIFECYCLES, where $FromMapping and $ToMapping come from,
so we need to use lower cased version accordingly.
diff --git a/share/html/Admin/Lifecycles/Mappings.html b/share/html/Admin/Lifecycles/Mappings.html
index 981ecde821..dc4aa59c1d 100644
--- a/share/html/Admin/Lifecycles/Mappings.html
+++ b/share/html/Admin/Lifecycles/Mappings.html
@@ -74,7 +74,7 @@
<% $OtherStatus %>:
</div>
<div class="col-8 value">
- <& /Elements/SelectStatus, Statuses => \@MyStatuses, Default => $FromMapping->{$OtherStatus}, Name => 'map-' . $Other->Name . '--' . $OtherStatus . '--' . $LifecycleObj->Name&>
+ <& /Elements/SelectStatus, Statuses => \@MyStatuses, Default => $FromMapping->{lc $OtherStatus}, Name => 'map-' . $Other->Name . '--' . $OtherStatus . '--' . $LifecycleObj->Name&>
</div>
</div>
% }
@@ -88,7 +88,7 @@
<% $MyStatus %>:
</div>
<div class="col-8 value">
- <& /Elements/SelectStatus, Statuses => \@OtherStatuses, Default => $ToMapping->{$MyStatus}, Name => 'map-' . $LifecycleObj->Name . '--' . $MyStatus . '--' . $Other->Name &>
+ <& /Elements/SelectStatus, Statuses => \@OtherStatuses, Default => $ToMapping->{lc $MyStatus}, Name => 'map-' . $LifecycleObj->Name . '--' . $MyStatus . '--' . $Other->Name &>
</div>
</div>
% }
diff --git a/share/html/Elements/SelectStatus b/share/html/Elements/SelectStatus
index 1eed841156..386cb15063 100644
--- a/share/html/Elements/SelectStatus
+++ b/share/html/Elements/SelectStatus
@@ -59,7 +59,7 @@
% }
% foreach my $status (@{$statuses_by_lifecycle{$lifecycle}}) {
% next if ($SkipDeleted && lc $status eq 'deleted');
-% my $selected = defined $Default && $status eq $Default ? 'selected="selected"' : '';
+% my $selected = defined $Default && lc $status eq lc $Default ? 'selected="selected"' : '';
<option value="<% $status %>" <% $selected |n %>><% loc($status) %></option>
% }
% if ($group_by_lifecycle) {
-----------------------------------------------------------------------
More information about the rt-commit
mailing list