[rt-devel] displaying keywords on queue list --RT

Adam Morton lists at adammorton.com
Thu May 2 00:00:30 EDT 2002


Kludge:

my $OtherPath = ref($OtherKey) ? $OtherKey->Path() : $OtherKey;

----- Original Message ----- 
From: "Colleen" <colleen at darksideproductions.net>
To: "Adam Morton" <lists at adammorton.com>; <rt-devel at lists.fsck.com>
Sent: Wednesday, May 01, 2002 11:10 PM
Subject: RE: [rt-devel] displaying keywords on queue list --RT


Here's one thing that happens as a result of your modifications (which I
have implemented):

If you display that Keyword and it's results on any of the Display
pages, etc, it shows the entire path.

In WebRT/html/Ticket/Elements/ShowKeywordSelects
There's:

% my $Keywords = $Ticket->KeywordsObj($KeywordSelect->Id);
% while (my $Keyword = $Keywords->Next) {
        <li>
<% $Keyword->KeywordObj->RelativePath($KeywordSelect->KeywordObj) |n
%></li>

%   }

and the output of this will show the entire path.

In my case, ShowKeywordSelects displays:
"Action City:  City/Atlanta" instead of just "Action City: Atlanta"

Is there a workaround to fix this?


Thanks!

Colleen



> -----Original Message-----
> From: Adam Morton [mailto:lists at adammorton.com]
> Sent: Tuesday, April 30, 2002 10:40 AM
> To: rt-devel at lists.fsck.com
> Subject: Re: [rt-devel] displaying keywords on queue list --RT
> 
> I was hacking around the object model to try to find a way to do this,
and
> what I came up with was to put something like:
> 
>        { Header => 'Type of Bagel',
>      TicketAttribute => 'KeywordsObj(1)->RelativePaths()->[0];'
>      },
> 
> in config.pm.
> 
> The Header should be the name of the KeywordSelect retrieved by
> Ticket->KeywordsObj(1) (i.e., SELECT * FROM KeywordSelects WHERE
id=1'),
> or
> whatever KeywordSelects.id you want.
> 
> This will output the relative path of the first keyword returned by
the
> numbered KeywordSelect associated with that ticket.
> 
> At least, that's how it should work according to my reading of the
object
> docs.  But, if you do this, Keyword::RelativePath() barfs because it
tries
> to call the 'Path' method on its shifted input which in this case
seems to
> be a bare string that is actually already the path we want.  So, if
you
> comment out the ->Path call:
> 
> my $OtherPath = $OtherKey; # ->Path();
> ### Line ~279
> 
> It will work in this instance.  I don't have RT in production so I can
say
> that this doesn't break something else (seems like it should!).  Any
> developer care to comment on what is going on here?  I haven't had
time to
> trace the issue further.
> 
> Even this is really only useful if you have single keywords per
ticket,
> and
> they are assigned to all your queues.  Making a truly useful keyword
> search
> display would seem to be a good bit of work.  It would be nice if the
> query
> were LEFT JOINed in such a way to make them sortable as well...
> 
> --Adam
> 
> ----- Original Message -----
> From: "Colleen" <colleen at darksideproductions.net>
> To: <rgoonan at sunitafe.edu.au>; <rt-devel at lists.fsck.com>
> Sent: Tuesday, April 30, 2002 12:04 AM
> Subject: [rt-devel] displaying keywords on queue list --RT
> 
> 
> Matt:
> 
> I read your post on rt-devel about displaying keywords on the queue
> list, /Search/Listing.html, did you ever figure out a solution?
> 
> Thanks in advance,
> 
> 
> Colleen
> 
> 
> 
> >> All,
> >>
> >> Has anyone ever put a ShowKeywordSelects element or some such thing
> to
> >> show a keyword selection in a queue listing (similar to
> Listing.html)?
> >>
> >> Thanks,
> >> Matt
> 
> _______________________________________________
> rt-devel mailing list
> rt-devel at lists.fsck.com
> http://lists.fsck.com/mailman/listinfo/rt-devel
> 
> 
> 
> _______________________________________________
> rt-devel mailing list
> rt-devel at lists.fsck.com
> http://lists.fsck.com/mailman/listinfo/rt-devel

_______________________________________________
rt-devel mailing list
rt-devel at lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-devel






More information about the Rt-devel mailing list