Opened 7 years ago

Last modified 4 years ago

#5831 new enhancement

How about suggesting other fields?

Reported by: makotka@… Owned by: rjollos
Priority: normal Component: KeywordSuggestPlugin
Severity: normal Keywords:
Cc: hasienda, falkb, itamarost Trac Release: 0.11

Description (last modified by rjollos)

It would be great to use SuggestBox to other fields (e.g. component as well as some custom fields).

Can I get some clue?

Attachments (0)

Change History (6)

comment:1 Changed 6 years ago by rjollos

  • Description modified (diff)

Component is a drop-down list, so I don't see how this could be used there. It seems reasonable that this could be generalized to arbitrary custom fields, however.

comment:2 Changed 5 years ago by rjollos

  • Owner changed from scratcher to rjollos

comment:3 Changed 5 years ago by rjollos

  • Cc hasienda falkb itamarost added; anonymous removed
  • Status changed from new to assigned

I've given this some more thought. I can't see how the plugin would be useful for the Component field because it is a drop-down list. For custom fields, you could just make a drop-down list. I suppose you might want to have the flexibility to define the custom field as a text box and provide some suggestions through the KeywordSuggestPlugin.

I might actually have a use case for this, since I'd like to have a Requirements field that is populated from a list of possible user requirements that the ticket satisfies. Initially, I was thinking this would be implemented through a custom field of type (listbox), but fullfilling the request in this ticket along with #3816 would allow users to add to the possible values for the field. Having the field be a select box, I'd have to manage the list through trac.ini.

It will probably be more complicated to modify the plugin so that it could be used on multiple fields. I'll look at both possibilities.

comment:4 Changed 5 years ago by rjollos

(In [11004]) Refs #5831: (0.4.5dev) The ticket field to which the suggestion list is attached can be a field other than Keywords. The field must be a text type. The suggestion can still only be used on one field.

comment:5 Changed 5 years ago by rjollos

My proposal for using the autocomplete feature on multiple fields of the ticket page is to follow a pattern similar what is done for t:TracTicketsCustomFields. The configuration file would look like this:

fields = keywords, requirements
keywords.keywords = tag1,tag2,tag3
keywords.mustmatch = false
keywords.helppage = wiki/TicketKeywords
keywords.helppage.newwindow = False
keywords.matchcontains = True
keywords.multipleseparator = ,
requirements.usetagsplugin = true
requirements.mustmatch = False
requirements.helppage = wiki/TicketKeywords
requirements.helppage.newwindow = False
requirements.matchcontains = True
requirements.multipleseparator = ,

I probably won't have this fully implemented for a couple of weeks. Feedback is welcome and appreciated.

comment:6 Changed 4 years ago by rjollos

  • Status changed from assigned to new

Add Comment

Modify Ticket

as new The owner will remain rjollos.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.