extending tickets autocomplete

Christian Loos <[email protected]>
Newsgroups gmane.comp.bug-tracking.request-tracker.devel
Message-ID <[email protected]>
Hi,

for a custom ticket create form I need an ticket autocomplete which
limit the returned tickets by queues and customfield values.

Creating a new helper isn't sufficient because the autocomplete helper
names are hard coded in share/static/js/autocomplete.js.

Thinking about making the ticket autocomplete more flexible I came up
with two solutions:

1. change share/static/js/autocomplete.js to match for the end of the
helper name, so a new FooBarTickets helper is treated the same as the
Tickets helper

2. add the possibility to use a new data-autocomplete-query attribute
which lets you define some ticket sql which is added to the query in
share/html/Helpers/Autocomplete/Tickets

Is one of the solutions something that can be integrated into core?
Are there other solutions?


Also, what is the use case for the cssClassMap in
share/static/js/autocomplete.js?
I couldn't find anything that uses this css classes in the code.

Chris
-- 
RT Training - Boston, September 9-10
http://bestpractical.com/training
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.