[rt-users] Prettifying priorities in RT3

Jonas Lincoln lincoln at unit.liu.se
Thu May 22 02:19:55 EDT 2003


I added this code for priorities. Note that we only use 5 steps in prio, 
and defaults to 3, but that is of course modable to your requirements.

Happy coding!

/Jonas

In html/Ticket/Elements/EditBasic, change the former priority textfield to:
<&|/l&>Priority</&>: <& /Ticket/Elements/SelectPriority, Name => 
'Priority', Default => $TicketObj->Priority &>

And add the following to a file named SelectPriority:

bash-2.03$ pwd
/service/rt3/local/html/Ticket/Elements
bash-2.03$ cat SelectPriority
% my $i;
<SELECT NAME="<% $Name %>">
% for ($i = 1; $i <= 5; $i++) {
<OPTION VALUE="<%$i%>" <% ($Default == $i) && 'SELECTED' %> ><%$i%> <% 
($i == 1) && '(highest)'%><% ($i == 5) && '(lowest)'%></OPTION>
% }
</SELECT>

<%INIT>
     if ($Default > 5 || $Default < 1) {
         $Default = 3;
     }
</%INIT>

<%ARGS>
$Name    => undef
$Default => 3
</%ARGS>




Miro Jurisic wrote:
> I want some notion of priority that involves human-readable names for 
> priorities. If I use built-in priorities, I see no way to get 
> human-readable names (High, Low, Critical, etc), and if I use a custom 
> field for priorities, I see no way to get my search results sorted by 
> that custom field.
> 
> How can I do what I want?
> 
> Thanks,
> 
> meeroh




More information about the rt-users mailing list