[Rt-commit] rt branch, 4.6/priority-as-string, repushed

Brian Duggan brian at bestpractical.com
Wed May 30 11:32:24 EDT 2018


The branch 4.6/priority-as-string was deleted and repushed:
       was e552ed4ef11373cccf054aa19ff917e9b680cfd9
       now 0f00df04f39abf5b113a302d4f466df702bc9e28

1: ab4241bc9 ! 1: 1ee888e05 Core RT::Extension::PriorityAsString
    @@ -136,6 +136,45 @@
     +    if $QueueObj->Id and $queues{$QueueObj->Name};
     +
      $Default = '' unless defined $Default;
    + </%INIT>
    +
    +diff --git a/share/html/Search/Elements/PickBasics b/share/html/Search/Elements/PickBasics
    +--- a/share/html/Search/Elements/PickBasics
    ++++ b/share/html/Search/Elements/PickBasics
    +@@
    +     },
    + );
    + 
    ++# Updating 'Path' for *Priority:
    ++#
    ++# Don't update 'Path' when %PriorityAsStringQueues is not
    ++# configured. SelectPriority hands off to SelectPriorityAsString when
    ++# %PriorityAsString is configured.
    ++#
    ++# Display the number input unless all queues specified use
    ++# %PriorityAsStringQueues.
    ++my %as_string = RT->Config->Get('PriorityAsStringQueues');
    ++
    ++if ( %queues and %as_string and scalar(keys %queues) == grep {$as_string{$_}} keys %queues ) {
    ++    # Additionally, all queues in PriorityAsStringQueues must use the _same_
    ++    # values for each name; if "High" is mapped to 10 in one queue and 100
    ++    # in another, we can't use names
    ++    my %values;
    ++    for my $q (keys %queues) {
    ++	for my $priority (keys %{$as_string{$q}}) {
    ++	    return if exists $values{$priority} and $as_string{$q}{$priority} != $values{$priority};
    ++	    $values{$priority} = $as_string{$q}{$priority};
    ++	}
    ++    }
    ++
    ++    # Swap out the /Elements/SelectPriority for /Elements/SelectPriorityAsString
    ++    my ($priority) = grep {$_->{Name} eq "Priority"} @lines;
    ++    $priority->{Value}{Path} = "/Elements/SelectPriorityAsString";
    ++    $priority->{Value}{Arguments}{Mapping} = \%values;
    ++}
    ++
    + $m->callback( Conditions => \@lines );
    + 
      </%INIT>
     
     diff --git a/share/html/Ticket/Elements/EditBasics b/share/html/Ticket/Elements/EditBasics
2: e552ed4ef = 2: 0f00df04f Add pod for PriorityAsString



More information about the rt-commit mailing list