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

Adam Morton lists at adammorton.com
Tue Apr 30 14:39:51 EDT 2002


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






More information about the Rt-devel mailing list