[Rt-commit] rt branch, 4.6/priority-as-string, repushed
Craig Kaiser
craig at bestpractical.com
Thu Jan 3 11:46:48 EST 2019
The branch 4.6/priority-as-string was deleted and repushed:
was 7a5a036983aecd3ec31c993caed8ce2bfbfe6c6a
now 4504c9ba4c554bf6130e92fdf30064b6ef27603d
1: e4dcd082ea = 1: e4dcd082ea reapply dropped changes of "Remove dashboard from menu if it can't be loaded"
2: 7a5a036983 ! 2: 52a22b4545 Core RT::Extension::PriorityAsString existing behavior of extension.
@@ -8,6 +8,21 @@
+++ b/etc/RT_Config.pm.in
@@
+ =back
+
++=head2 C<@ClearHash>
+
++Set this array for config values that should have the default hash keys completly removed in
++favor or new ones set in config.
+
++=cut
++
++Set(@ClearHash, qw/PriorityAsString/);
+
+ =head1 Database connection
+
+@@
+
Set($LinkArticlesOnInclude, 1);
+=item C<%NumericalPriority>
@@ -33,7 +48,7 @@
+
+=cut
+
-+Set(%PriorityAsString, ());
++Set(%PriorityAsString, Low => 0, Medium => 50, High => 100);
+
+=item C<%PriorityAsStringOrder>
+
@@ -73,6 +88,19 @@
=back
=head1 Assets
+
+diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
+--- a/lib/RT/Config.pm
++++ b/lib/RT/Config.pm
+@@
+ if ( exists $OPTIONS{$name} ) {
+ if ( $type eq 'HASH' ) {
+ $args{'Value'} = [
+- @{ $args{'Value'} },
++ grep (/$name/, @{$OPTIONS{ClearHash}}) ? () : @{ $args{'Value'} },
+ @{ $args{'Value'} }%2? (undef) : (),
+ $self->Get( $name ),
+ ];
diff --git a/lib/RT/Ticket.pm b/lib/RT/Ticket.pm
--- a/lib/RT/Ticket.pm
@@ -375,3 +403,4 @@
$m->content_contains( '2 hour', 'time estimates' );
$m->content_contains( '30 min', 'time worked' );
$m->content_contains( '60 min', 'time left' );
+
-: ------- > 3: 4504c9ba4c Test that PriorityAsString hash is reset when set from siteconfig
More information about the rt-commit
mailing list