I was going to investigate adding an option (config.pm) to select the
presentation of the case priority as a label name rather than (just) as
a raw number. Internally, it would remain the same, but when this option is
enabled, it will display specified labels (also in the config.pm) instead
or in addition to the numeric setting, and pull-downs would be offered to
change the priority by these (custom) labels :
# e.g. labels to use; Low < 20; General < 40; High < 60; etc...
%PriorityLabels = { 'None' => 0, 'Low' => 1, 'General' => 20,
'High' => 40, 'Zesty' => 60, 'FireHot' => 80 };
$PriorityType = 0; # 0 - integer; 1 - labels; other - both
Any thoughts/comments on this hack ?
regards,
-eric
Fujitsu Processor Technologies, Inc.
(Lawrence System Integration, Inc.)
I was going to investigate adding an option (config.pm) to select the
presentation of the case priority as a label name rather than (just) as
a raw number. Internally, it would remain the same, but when this option is
enabled, it will display specified labels (also in the config.pm) instead
or in addition to the numeric setting, and pull-downs would be offered to
change the priority by these (custom) labels :
e.g. labels to use; Low < 20; General < 40; High < 60; etc…
$PriorityType = 0; # 0 - integer; 1 - labels; other - both
Any thoughts/comments on this hack ?
My thought is “Let me give you mine first”. I’ve already done what
you’ve described, but without PriorityType. I haven’t sat down and
separated out our local modifications feature by feature, but I’ll try
to do so for this one today or tonight.
Mine doesn’t
handle ranges, if you use bubbling priority – in fact,
let’s call priority settings not corresponding to labels
“undefined behaviour”
use FinalPriority at all
let you turn it off
-Rich
Rich Lafferty --------------±----------------------------------------------
Ottawa, Ontario, Canada | Save the Pacific Northwest Tree Octopus! http://www.lafferty.ca/ | Save The Pacific Northwest Tree Octopus
rich@lafferty.ca -----------±----------------------------------------------
My thought is “Let me give you mine first”. I’ve already done what
you’ve described, but without PriorityType. I haven’t sat down and
separated out our local modifications feature by feature, but I’ll try
to do so for this one today or tonight.
Mine doesn’t
handle ranges, if you use bubbling priority – in fact,
let’s call priority settings not corresponding to labels
“undefined behaviour”
use FinalPriority at all
let you turn it off
Too l8… forgive me Right after posting i went straight to work,
and wrapped it up by late afternoon, comes up very clean tho. yay!
Check it out …
This patch changes the presentation and selection of ticket/queue
priorities to user-defined labels and menu pull-downs. It does not make
any changes to the database or the tickets themselves, just the Web
front-end. Thus it should still work with existing priority escalation
schemes (EscalatePriority.pm); it was coded to avoid ticket priorities
from getting "snap"ed back to their base priority value. It can be
turned on and off at will (with a web server restart in between). We’ll
be using this feature heavily; would love to see this or similar added
into the main distro. if anything, less hacking for me with each
release
Presentation of priorities is controlled in “config.pm” :
# How to display ticket priority
# This can change to/from anytime; presentation only & doesn't affect the
# database; must restart web server to take effect
# 0 - DEFAULT: integer value (0-99)
# 1 - use label values (as seen in %PriorityLabels)
# >1 - use label values, but also display ## (eg "General/35")
# if using "bubbling priorities", good to set this
$PriorityType = 1;
# Priority labels; 1 >= Low < 20; 20 >= General < 40; 40 >= High < 60; etc..
%PriorityLabels = ( 'None' => 0, 'Low' => 1, 'General' => 20,
'High' => 40, 'Critical' => 60, 'Fatal' => 99 );
# (leave @PrioritySortedKeys alone; used to set label for priorities)
@PrioritySortedKeys = reverse sort { $PriorityLabels{ $a } <=>
$PriorityLabels{ $b } }
keys %PriorityLabels;
Might also be valuable to add an additional column to the display when using
this (or just otherwise when tracking priority is important, but change
‘PriorityAsString’ to just ‘Priority’ if not using this patch) :
The patch here is based on 2.0.11 release into an installed system,
assuming it survives e-mail mangling (with tabs n’ all). To patch the
build tree, simply symlink webrt → WebRT, and . → WebRT/html .
jeers,
-eric
( cd /topof/RT; …/gnu/bin/patch -p1 < /tmp/rt.patch )
*** ./WebRT/html/Admin/Elements/ModifyQueue-old Tue Nov 6 17:06:10 2001
— ./WebRT/html/Admin/Elements/ModifyQueue Tue Feb 26 20:23:16 2002
*** 26,36 ****
Priority starts at:
!
Over time, priority moves toward:
!
--- 26,36 ----
Priority starts at:
!
Over time, priority moves toward:
!
*** ./WebRT/html/Admin/Queues/Modify.html-old Mon Dec 3 18:13:24 2001
--- ./WebRT/html/Admin/Queues/Modify.html Tue Feb 26 20:47:09 2002
*** 37,47 ****
Priority starts at:
!
Over time, priority moves toward:
!
--- 37,57 ----
Priority starts at:
!
! % if ($RT::PriorityType) {
! <& /Elements/SelectPriority, Name => "InitialPriority", Default => $QueueObj->InitialPriority &>
! % } else {
!
! % }
Over time, priority moves toward:
!
! % if ($RT::PriorityType) {
! <& /Elements/SelectPriority, Name => "FinalPriority", Default => $QueueObj->FinalPriority &>
! % } else {
!
! % }
*** ./WebRT/html/Elements/SelectPriority-old Sun Nov 4 17:04:00 2001
--- ./WebRT/html/Elements/SelectPriority Wed Feb 27 13:31:21 2002
*** 0 ****
--- 1,33 ----
+ %#
+
+ <%ARGS>
+ $Name => undef
+ $Default => undef
+
+ <%INIT>
+ my($priidx,$defprilabel,$defprivalue);
+ foreach $priidx (@RT::PrioritySortedKeys) {
+ if ( $Default >= $RT::PriorityLabels{$priidx}) {
+ # save current equivalent priority label
+ $defprilabel=$priidx;
+ # save current priority value to prevent tickets from having
+ # their priorities "snap"ed to closest level
+ $defprivalue=$Default;
+ last;
+ }
+ }
+
*** ./WebRT/html/Search/Bulk.html-old Tue Nov 6 17:07:01 2001
--- ./WebRT/html/Search/Bulk.html Tue Feb 26 19:52:20 2002
*** 74,80 ****
--- 74,84 ----
Make subject
+ % if ($RT::PriorityType) {
+
Make priority <& /Elements/SelectPriority, Name => "Priority" &>
+ % } else {
Make priority
+ % }
Make queue <& /Elements/SelectQueue, Name => "Queue" &>
Make Status <& /Elements/SelectStatus, Name => "Status" &>
*** 117,123 ****
map ($ARGS{$_} =~ /^$/ && (delete $ARGS{$_}), keys %ARGS);
my ($bgcolor, @results);
! my @cols = qw(id Status Priority Subject QueueObj->Name OwnerObj->Name RequestorsAsString DueAsString );
Abort(“No search to operate on”) unless ($session{‘tickets’});
*** 53,58 ****
— 53,60 ----
<%INIT> #It’s hard to do this inline, so we’ll preload the html of the selectstatus in here.
my $SelectStatus = $m->scomp(“/Elements/SelectStatus”, Name => ‘Status’, Default=> $TicketObj->Status);
my $SelectPriority = $m->scomp(“/Elements/SelectPriority”, Name => ‘Priority’, Default=> $TicketObj->Priority);
my $SelectFinalPriority = $m->scomp(“/Elements/SelectPriority”, Name => ‘FinalPriority’, Default=> $TicketObj->FinalPriority);
my $SelectQueue = $m->scomp(“/Elements/SelectQueue”, Name => ‘Queue’, Default =>$TicketObj->QueueObj->Id);
</%INIT>
*** ./WebRT/html/Ticket/Elements/ShowBasics-old Tue Nov 6 17:07:10 2001
— ./WebRT/html/Ticket/Elements/ShowBasics Tue Feb 26 18:59:03 2002
*** 9,15 ****
<& /Elements/ShadedBox, title => ‘Worked’ , content => $TimeWorked ." min" &>
! <& /Elements/ShadedBox, title => ‘Priority’, content=> $Ticket->Priority.“/”.$Ticket->FinalPriority &>
I have recently upgraded from rt2 to rt-3.2.2. In rt2 I had enjoyed
using a patch by Eric Berggren that replaced the numeric priority
display throughout RT by labelled equivalents. The numeric priorities
can be difficult to use, particularly for those who aren’t using the
progressive priority features of RT and where RT is being used by
non-technical staff. Eric’s patch addressed this problem.
As far as I can see there has been no equivalent patch to rt3, and
(unfortunately) this useful functionality was never rolled into the
main rt3 distribution.
I have modified Eric’s original patch so that it applies to rt-3.2.2.
Or, why not 3 queues – for calls, projects, and misc?
Assign the relevant person as owner. That way
you don’t have to create/delete queues as people come and go.
An appropriate queury would separate them just fine.