Two questions on custom fields:
(1) The Administrator Question: I’ve created a “enter multiple values”
field on a queue. When I visit Ticket/Modify.html for a
particular ticket, there’s an edit box prompting me to “enter
multiple values”. How do I do that? “One value to a line” isn’t
it; I just get one big value with multiple lines to it.
(2) The Hacker Question: I have some HTML::Mason code that gets the
list of possible values, then displays them, along with any
tickets that have that value. The code looks like:
% foreach my $value (@$Values) { <%$value%> <%PERL> $Tickets->ClearRestrictions; $Tickets->LimitStatus(VALUE => "new"); $Tickets->LimitStatus(VALUE => "open"); $Tickets->LimitQueue(VALUE => "Bugs", OPERATOR => "="); $Tickets->LimitCustomField(CUSTOMFIELD => 3, OPERATOR => "=", VALUE => "$Name $value"); while (my $Ticket = $Tickets->Next) { <%$Ticket->id%> (<%$Ticket->OwnerObj->Name%>) <%$Ticket->Subject%> % }
% } <%INIT> my $Tickets = RT::Tickets->new($session{'CurrentUser'}); <%ARGS> $Class => 'oddline' $Name => undef $Values => []
Is this, in fact, the best way to do it? It feels vaguely
sluggish, though I haven’t looked into it more; I assume throwing
an index at the values of the custom field would help.
I’m also open to UI suggestions. The listing looks sort of like this:
Name 1, which is potentially quite long
Case 1: 1 (Nobody) Case 1 is broken, 2 (dmaze) Cases 1-3 need help
Case 2: 2 (dmaze) Cases 1-3 need help
Name 2, also potentially quite long
Case 3: 2 (dmaze) Cases 1-3 need help
Case 4
Right now “Name 1”, “Name 2”, “Name 3”, etc. are in alternating colors
(evenrow, oddrow); I have no good way of dealing if the list of
tickets associated with a particular case overflow. I’d also like a
more convenient way of associating a case with a ticket, rather than
forcing users to type out the full name of the name and case possibly
mult8iple times.
David Z. Maze dmaze@cag.lcs.mit.edu
Research Scientist David's Home Page
MIT LCS Computer Architecture Group MIT Computer Architecture Group Home Page