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

Michel Rodriguez michel at bestpractical.com
Wed Jun 12 08:45:09 EDT 2019


The branch 4.6/priority-as-string was deleted and repushed:
       was 3f3e41ae72d3129740939152d224d7affe0d0cba
       now 53affddf2d0deb03628c60a7b85ce923ece4c499

1: e4dcd082e = 1: e4dcd082e reapply dropped changes of "Remove dashboard from menu if it can't be loaded"
2: 52a22b454 = 2: 52a22b454 Core RT::Extension::PriorityAsString existing behavior of extension.
3: 4504c9ba4 = 3: 4504c9ba4 Test that PriorityAsString hash is reset when set from siteconfig
4: 3f3e41ae7 ! 4: 53affddf2 cored priority as string
    @@ -4,138 +4,19 @@
         
         adds final proposal for the feature:
         
    -        Set($EnablePriorityAsString, 1);
    +    Unify and streamline PriorityAsString configuration
         
    -        Set(%PriorityAsString,
    -          # default (for non specified queues)
    -          Default => { Low => 0, Medium => 50, High => 100 },
    -          # per queue priorities
    -          General    => { Low => 0, High => 1 },
    -          # drop-downs will display in order Low/High/Medium
    -          LHM        => [ Low => 0, High => 100, Medium => 50 ],
    -          # use numerical priorities
    -          NumQueue   => 0,
    -        );
    +    As an extension, PriorityAsString grew additional configuration
    +    options as features were added. As a core feature, we want to
    +    add as few new configuration options as possible while still
    +    providing the needed features.
    +    
    +    The updated configuration provides options to handle global
    +    configuration, per queue settings, and sensible defaults.
     
     diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
     --- a/etc/RT_Config.pm.in
     +++ 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
    - 
    -@@
    -    '<small>__LastUpdatedRelative__</small>',
    -    '<small>__TimeLeft__</small>'});
    - 
    -+
    -+=item C<$UserTicketDataResultFormat>
    -+
    -+This is the format of ticket search result for "Download User Tickets" links. It
    -+defaults to C<DefaultSearchResultFormat> for privileged users and C<DefaultSelfServiceSearchResultFormat>
    -+for unprivileged users if it's not set.
    -+
    -+=cut
    -+
    -+Set($UserTicketDataResultFormat, undef );
    -+
    -+=item C<$UserDataResultFormat>
    -+
    -+This is the format of the user search result for "Download User Data" links.
    -+
    -+=cut
    -+
    -+Set($UserDataResultFormat, "'__id__', '__Name__', '__EmailAddress__', '__RealName__',\
    -+                            '__NickName__', '__Organization__', '__HomePhone__', '__WorkPhone__',\
    -+                            '__MobilePhone__', '__PagerPhone__', '__Address1__', '__Address2__',\
    -+                            '__City__', '__State__','__Zip__', '__Country__', '__Gecos__', '__Lang__',\
    -+                            '__Timezone__', '__FreeFormContactInfo__'");
    -+
    -+=item C<$UserTransactionDataResultFormat>
    -+
    -+This is the format of the user transaction search result for "Download User Transaction Data" links.
    -+
    -+=cut
    -+
    -+Set($UserTransactionDataResultFormat, "'__ObjectId__/TITLE:Ticket Id', '__id__', '__Created__', '__Description__',\
    -+                                        '__OldValue__', '__NewValue__', '__Content__'");
    -+
    -+
    - =item C<$DefaultSearchResultOrderBy>
    - 
    - What Tickets column should we order by for RT Ticket search results.
    -@@
    - 
    - =over 4
    - 
    -+=item C<$DisplayTotalTimeWorked>
    -+
    -+Set to 1 to display Total Time Worked in the Basics section.
    -+
    -+Total Time Worked is a dynamic value containing a sum of Time Worked for
    -+the parent and all child tickets.  This value is generated when displaying
    -+the ticket and automatically updates when a child ticket is added or removed.
    -+Total Time Worked follows only parent/child link relationships.  Tickets
    -+linked with depends-on or refers-to links are not included.
    -+
    -+Total Time Worked is also available as a column for reports generated with
    -+the Query Builder.
    -+
    -+=cut
    -+
    -+Set($DisplayTotalTimeWorked, 0);
    -+
    - =item C<$ShowMoreAboutPrivilegedUsers>
    - 
    - This determines if the 'More about requestor' box on
    -@@
    - alleviate the sometimes huge owner list for installations where many
    - users have the OwnTicket right.
    - 
    --Autocompleter is automatically turned on if list contains more than
    --50 users, but penalty of executing potentially slow query is still paid.
    -+The Owner entry is automatically converted to an autocomplete box if the list
    -+of owners exceeds C<$DropdownMenuLimit> items. However, the query to generate
    -+the list of owners is still run and this can increase page load times. If
    -+your owner lists exceed the limit and you are using the autocomplete box, you
    -+can improve performance by explicitly setting C<$AutocompleteOwners>.
    - 
    - Drop down doesn't show unprivileged users. If your setup allows unprivileged
    - to own ticket then you have to enable autocompleting.
    -@@
    - 
    - Set($AutocompleteOwners, 0);
    - 
    -+=item C<$DropdownMenuLimit>
    -+
    -+The Owner dropdown menu, used in various places in RT including the Query
    -+Builder and ticket edit pages, automatically changes from a dropdown menu to
    -+an autocomplete field once the menu holds more than the C<$DropdownMenuLimit>
    -+owners. Dropdown menus become more difficult to use when they contain a large
    -+number of values and the autocomplete textbox can be more usable.
    -+
    -+If you have very large numbers of users who can be owners, this can cause
    -+slow page loads on pages with an Owner selection. See L</$AutocompleteOwners>
    -+for a way to potentially speed up page loads.
    -+
    -+=cut
    -+
    -+Set($DropdownMenuLimit, 50);
    -+
    - =item C<$AutocompleteOwnersForSearch>
    - 
    - If set to 1, the owner drop-downs for the query builder are always
     @@
      
      Set($HideUnsetFieldsOnDisplay, 0);
    @@ -226,259 +107,7 @@
     +
      =back
      
    -+
    -+
      =head2 Self Service Interface
    - 
    - The Self Service Interface is a view automatically presented to Unprivileged
    -@@
    - 
    - Set($SelfServiceRegex, qr!^(?:/+SelfService/)!x );
    - 
    --=back
    -+=item C<$SelfServiceUserPrefs>
    - 
    --=head2 Articles
    -+This option controls how the SelfService user preferences page is
    -+displayed. It accepts a string from one of the four possible modes
    -+below.
    - 
    --=over 4
    --
    --=item C<$ArticleOnTicketCreate>
    -+=over
    - 
    --Set this to 1 to display the Articles interface on the Ticket Create
    --page in addition to the Reply/Comment page.
    -+=item C<edit-prefs> (the default)
    - 
    --=cut
    -+When set to C<edit-prefs>, self service users will be able to update
    -+their Timezone and Language preference and update their password.
    -+This is the default behavior of RT.
    - 
    --Set($ArticleOnTicketCreate, 0);
    -+=item C<view-info>
    - 
    --=item C<$HideArticleSearchOnReplyCreate>
    -+When set to C<view-info>, users will have full access to all their
    -+user information stored in RT on a read-only page.
    - 
    --Set this to 1 to hide the search and include boxes from the Article
    --UI.  This assumes you have enabled Article Hotlist feature, otherwise
    --you will have no access to Articles.
    -+=item C<edit-prefs-view-info>
    - 
    --=cut
    -+When set to C<edit-prefs-view-info>, users will have full access as in
    -+the C<view-info> option, but also will be able to update their Locale
    -+and password as in the default C<edit-prefs> option.
    - 
    --Set($HideArticleSearchOnReplyCreate, 0);
    -+=item C<full-edit>
    - 
    --=item C<$LinkArticlesOnInclude>
    -+When set to C<full-edit>, users will be able to fully view and update
    -+all of their stored RT user information.
    - 
    --Set this to 0 to suppress the default behavior of automatically linking
    --to Articles when they are included in a message.
    -+=back
    - 
    - =cut
    - 
    --Set($LinkArticlesOnInclude, 1);
    -+Set($SelfServiceUserPrefs, 'edit-prefs');
    - 
    --=item C<%NumericalPriority>
    -+=item C<$SelfServiceRequestUpdateQueue>
    - 
    --Disable string priorities
    -+Set this to the name of the queue to use for tickets requesting updates
    -+to user infomation from Self Service users. Once it's set, a quick
    -+ticket create portlet will show up on Preferences page for self service
    -+users. This option is only available when $SelfServiceUserPrefs is set
    -+to 'view-info' or 'edit-prefs-view-info'.
    - 
    --    Set($NumericalPriority, 0);
    -+Self service users need the CreateTicket right on this queue to create
    -+a ticket.
    - 
    - =cut
    - 
    --Set($NumericalPriority, 0);
    -+Set($SelfServiceRequestUpdateQueue, undef);
    - 
    --=item C<%PriorityAsString>
    -+=item C<$SelfServiceDownloadUserData>
    - 
    --RT can assign a priority value to tickets. Priority is stored as an
    --integer in the database, but RT supports mapping strings to numerical
    --values. For example, the default mapping is:
    -+Allow Self Service users to download their user information, ticket data,
    -+and transaction data as a .tsv file. When enabled, these options
    -+will appear in the self service interface at Logged in as > Preferences.
    -+Users also need the ModifySelf right to have access to this page.
    - 
    --    Set(%PriorityAsString, Low => 0, Medium => 50, High => 100);
    -+=cut
    - 
    --Redefine C<%PriorityAsString> in C<RT_SiteConfig.pm> to set site
    --priority strings.
    -+Set( $SelfServiceDownloadUserData, 0 );
    - 
    --=cut
    - 
    --Set(%PriorityAsString, Low => 0, Medium => 50, High => 100);
    -+=back
    - 
    --=item C<%PriorityAsStringOrder>
    -+=head2 Articles
    - 
    --Administrators can alter the order of priority strings as they appear
    --in selection drop-downs with C<@PriorityStringOrder>. Administrators
    --can also use this setting to limit the available priority strings on
    --ticket update pages. When this options is defined, scrips and other RT
    --code will still have access to all of the priority strings defined in
    --C<%PriorityAsString>. To set a priority string order:
    -+=over 4
    - 
    --    Set(@PriorityAsStringOrder, qw(Low Medium High));
    -+=item C<$ArticleOnTicketCreate>
    -+
    -+Set this to 1 to display the Articles interface on the Ticket Create
    -+page in addition to the Reply/Comment page.
    - 
    - =cut
    - 
    --=item C<%PriorityAsStringQueues>
    -+Set($ArticleOnTicketCreate, 0);
    - 
    --RT supports different priority string mappings for individual queues
    --with C<%PriorityAsStringQueues>. Use queue names as keys in this
    --hash. Then define priority string-number hash maps for each queue's
    --value. Tickets in queues that aren't defined in this hash will fall
    --back to RT's numerical priorities.
    -+=item C<$HideArticleSearchOnReplyCreate>
    - 
    --When C<%PriorityAsStringQueues> is set, RT ignores both
    --C<%PriorityAsString> and C<@PriorityAsStringOrder>. Administrators do
    --not need to define C<%PriorityAsStringQueues> or C<%PriorityAsString>
    --when they set C<%PriorityAsStringQueues>.
    -+Set this to 1 to hide the search and include boxes from the Article
    -+UI.  This assumes you have enabled Article Hotlist feature, otherwise
    -+you will have no access to Articles.
    - 
    --To set per-queue priority strings:
    -+=cut
    - 
    --    Set(%PriorityAsStringQueues,
    --      General => { Low => 0, Medium => 50, High => 100 },
    --      Binary  => { Low => 0, High => 10 },
    --    );
    -+Set($HideArticleSearchOnReplyCreate, 0);
    -+
    -+=item C<$LinkArticlesOnInclude>
    -+
    -+Set this to 0 to suppress the default behavior of automatically linking
    -+to Articles when they are included in a message.
    - 
    - =cut
    - 
    -+Set($LinkArticlesOnInclude, 1);
    -+
    - =back
    - 
    - =head1 Assets
    -@@
    - 
    - =back
    - 
    -+=head2 Attach Files
    -+
    -+=over 4
    -+
    -+=item C<$PreferDropzone>
    -+
    -+By default, RT uses Dropzone to attach files if possible. If
    -+C<$PreferDropzone> is set to 0, RT will always use plain file inputs.
    -+
    -+=cut
    -+
    -+Set($PreferDropzone, 1);
    -+
    -+=back
    - 
    - =head2 Transaction display
    - 
    -@@
    - 
    - =item C<$AttachmentListCount>
    - 
    --The number of attachments to display by default on ticket display and ticket
    --reply pages. Attachments beyond this count will be displayed only after the
    --user clicks a "Show all" link. The default value, C<undef>, means always show
    -+Sets the number of attachments to display on ticket display and ticket
    -+update pages (default is 5). Attachments beyond this number are displayed
    -+only after the user clicks the "Show all" link. Set to C<undef> to always show
    - all attachments. A value of C<0> means show no attachments by default.
    - 
    - =cut
    - 
    --Set($AttachmentListCount, undef);
    -+Set($AttachmentListCount, 5);
    - 
    - =item C<$PreferRichText>
    - 
    -@@
    - L</$TrustHTMLAttachments> is enabled, the original HTML is available for
    - viewing via the "Download" link.
    - 
    -+If the optional L<HTML::Gumbo> dependency is installed, RT will leverage
    -+this to allow a broader set of HTML through, including tables.
    -+
    - =cut
    - 
    - Set($PreferRichText, 1);
    -@@
    - 
    - An array that contains default encodings used to guess which charset
    - an attachment uses, if it does not specify one explicitly.  All
    --options must be recognized by L<Encode::Guess>.
    --
    --The first element may also be C<*>, which attempts encoding detection
    --using L<Encode::Detect::Detector>.  This uses Mozilla's character
    --detection library to examine the bytes, and use frequency metrics to
    --rank the options.  This detection may fail (and fall back to other
    --options in the C<@EmailInputEncodings> list) if no decoding has high
    --enough confidence metrics.  As of L<Encode::Detect::Detector> version
    --1.01, it knows the following encodings:
    --
    --    big5-eten
    --    cp1250
    --    cp1251
    --    cp1253
    --    cp1255
    --    cp855
    --    cp866
    --    euc-jp
    --    euc-kr
    --    euc-tw
    --    gb18030
    --    iso-8859-2
    --    iso-8859-5
    --    iso-8859-7
    --    iso-8859-11
    --    koi8-r
    --    MacCyrillic
    --    shiftjis
    --    utf-8
    -+options must be recognized by L<Encode::Guess>.  The first element may
    -+also be '*', which enables encoding detection using
    -+L<Encode::Detect::Detector>, if installed.
    - 
    - =cut
    - 
     
     diff --git a/etc/RT_SiteConfig.pm b/etc/RT_SiteConfig.pm
     deleted file mode 100644
    @@ -755,19 +384,6 @@
      
      1;
     
    -diff --git a/lib/RT/Transaction.pm b/lib/RT/Transaction.pm
    ---- a/lib/RT/Transaction.pm
    -+++ b/lib/RT/Transaction.pm
    -@@
    -         # Generic:
    -         my $no_value = $self->loc("(no value)");
    -         return (
    --            "[_1] changed from [_2] to [_3]",
    -+            "[_1] changed from [_2] to [_3] XXX",
    -             $self->Field,
    -             ( $self->OldValue ? "'" . $self->OldValue . "'" : $no_value ),
    -             "'" . $self->NewValue . "'"
    -
     diff --git a/share/html/Admin/Queues/DefaultValues.html b/share/html/Admin/Queues/DefaultValues.html
     --- a/share/html/Admin/Queues/DefaultValues.html
     +++ b/share/html/Admin/Queues/DefaultValues.html



More information about the rt-commit mailing list