[Bps-public-commit] RT-Extension-MandatoryOnTransition branch, master, updated. 0.09_01-2-g6fd0d66
? sunnavy
sunnavy at bestpractical.com
Fri Feb 27 09:44:44 EST 2015
The branch, master has been updated
via 6fd0d66fe7208954a9cf0b0a675cb75678284693 (commit)
from 3be2b74fbb301b7965d3edfea9a5754929ddea26 (commit)
Summary of changes:
lib/RT/Extension/MandatoryOnTransition.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
- Log -----------------------------------------------------------------
commit 6fd0d66fe7208954a9cf0b0a675cb75678284693
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Feb 27 22:10:14 2015 +0800
sort hash keys to get a consistent behavior
because "keys" returns in a random order. cf values in different groups are
actually in sync, so it doesn't matter logically, it just feels more consistent
to pick the same entry every time.
diff --git a/lib/RT/Extension/MandatoryOnTransition.pm b/lib/RT/Extension/MandatoryOnTransition.pm
index b4a9937..7d3fec2 100644
--- a/lib/RT/Extension/MandatoryOnTransition.pm
+++ b/lib/RT/Extension/MandatoryOnTransition.pm
@@ -401,7 +401,7 @@ sub CheckMandatoryFields {
my $CFArgs = HTML::Mason::Commands::_ParseObjectCustomFieldArgs( $ARGSRef )->{'RT::Ticket'}{$TicketId || 0} || {};
my $submitted = $CFArgs->{$cf->id};
# Pick the first grouping
- $submitted = $submitted ? $submitted->{(keys %$submitted)[0]} : {};
+ $submitted = $submitted ? $submitted->{(sort keys %$submitted)[0]} : {};
$value = $submitted->{Values} // $submitted->{Value};
}
else {
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list