Ticket #3816 (assigned enhancement)

Opened 3 years ago

Last modified 2 months ago

[Patch] Offer all keywords used up to now for selection

Reported by: ThurnerRupert Assigned to: rjollos (accepted)
Priority: normal Component: KeywordSuggestPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

it would be nice to offer all keywords used up to now for selection, not only the ones specified in the config file.

Attachments

KeywordSuggestPluginPatch.tar.gz (1.7 kB) - added by carstenklein@yahoo.de on 12/28/09 03:11:40.
The "patch" to the KeywordSuggestPlugin (keywordsuggest.py)
keywordsuggest.py.tar.gz (1.7 kB) - added by carstenklein@yahoo.de on 01/04/10 15:43:31.
corrected version of the patch, the former did fail when fromdb was set to false

Change History

09/28/08 09:00:40 changed by anonymous

Do you mean with the tags out of the TagsPlugin ?

09/28/08 09:16:43 changed by anonymous

if the tags plugin is there it would be nice. otherwise just the entries already there in other ticket's keywords fields.

09/28/08 12:47:50 changed by scratcher

  • status changed from new to assigned.

As an improvement for this plugin I've planned to add TagsPlugin support, this will be done soon. I find not a big sence to duplicate functionality provided by TagsPlugin - basically it does exactly what was requested above and even more. It's not hard to add keywords fetching procedure to KeywordSuggestPlugin in one of following ways:

  • Make DB query + delimeter parsing every time when it's necessary to show keywords input field
  • Collect unique keywords after each modification of keyword ticket's field (require extra table in database)

Both of them adds complexity to this plugin which was designed to be as simple as possible. So philosophy is: you should use either lightweight solution with list of tags in trac.ini or TagsPlugin if you need something more powerfull.

09/28/08 12:52:39 changed by ThurnerRupert

100% agree!

11/07/08 15:14:16 changed by anonymous

There could be a performance hit in using the TagsPlugin, look at trac-hacks tag link above, it takes a couple seconds to load all the tags. multiply this by how many uses you have on your system and it makes having a separate table for available keywords more enticing. Also, the TagsPlugin can take tags from all sorts of fields or wiki pages, not just keywords field.

Of course, when a new keyword was entered into a ticket it would need to be added to the keyword table via an event listener. The only problem i can see is how to remove old keywords that are no longer used in tickets.... two options come to mind

  • allowing removal of keywords through an administration window (a little excessive)
  • or simply repopulate the table with available keywords on a regular basis (eg. daily) so that it is self maintained but with better performance than the TagsPlugin option.

Either way though, i think this feature is an essential addition to the KeywordSuggestPlugin

11/07/08 16:20:38 changed by athomas

The primary reason the tags link on TracHacks takes a while to load is that it loads every wiki page corresponding to a tag name, to fetch the title. This is not a cheap operation, but would be unnecessary for completion.

(follow-up: ↓ 8 ) 03/12/09 07:03:17 changed by jevans

TagsPlugin is great but unless I'm missing something it doesn't provide the automatic, in-screen assistance in picking consistent tags?

Certainly would be nice to have an option to use all entered tags/keywords instead of having to administer the list.

Not fond of any big slowdown but perhaps not too much of a hit (I hope) if you just have to query when a keyword is removed?

(in reply to: ↑ 7 ; follow-up: ↓ 9 ) 04/04/09 10:57:46 changed by anonymous

Replying to jevans:

TagsPlugin is great but unless I'm missing something it doesn't provide the automatic, in-screen assistance in picking consistent tags? Certainly would be nice to have an option to use all entered tags/keywords instead of having to administer the list. Not fond of any big slowdown but perhaps not too much of a hit (I hope) if you just have to query when a keyword is removed?

Obviously there must be ways around this... but...

"I find not a big sence to duplicate functionality provided by TagsPlugin "

...except that wanting a tags page is not a universal taste: look at the tags page on Trac-Hacks, it is just a stupid ugly useless mess. No use to anyone.

(in reply to: ↑ 8 ) 04/07/09 17:13:32 changed by jevans

Replying to anonymous:

Replying to jevans:

TagsPlugin is great but unless I'm missing something it doesn't provide the automatic, in-screen assistance in picking consistent tags? Certainly would be nice to have an option to use all entered tags/keywords instead of having to administer the list. Not fond of any big slowdown but perhaps not too much of a hit (I hope) if you just have to query when a keyword is removed?

Obviously there must be ways around this... but... "I find not a big sence to duplicate functionality provided by TagsPlugin " ...except that wanting a tags page is not a universal taste: look at the tags page on Trac-Hacks, it is just a stupid ugly useless mess. No use to anyone.

I'm all for leaving the tags page to the TagsPlugin. My interest is to avoid needing the admin to add tags manually to the config. That's probably fine for some. We're just looking for the auto-complete feature to avoid common typo's.

I don't know enough about Trac programming yet. My thought is if the ini setting is blank, you can maintain the list by checking for new or deleted tags when a ticket is saved. But of course I don't know what the overhead for that is.

08/03/09 23:12:33 changed by rjollos

I had thought this plug-in pulled keywords from the list of Tags, but I see now that is not the case. From what I have seen, with the TagsPlugin installed and the trac.ini configuration parameter ticket_fields = keywords, then all keywords will get added into the list of tags.

It would therefore be nice to have a trac.ini configuration parameter that allows the autocomplete of keywords to be take from the list of tags, such as keywordsfromtags = true.

08/03/09 23:13:16 changed by rjollos

It looks like someone may have implemented this in ticket #4201.

12/28/09 02:31:52 changed by carstenklein@yahoo.de

attached you find a new version of the plugin that will also read existing keywords from the database, namely from the table ticket and ticket_change. this can be controlled by a new configuration setting

[keywordsuggest]
fromdb = True | False

in addition it will mix in keywords defined in the configuration.

12/28/09 03:11:40 changed by carstenklein@yahoo.de

  • attachment KeywordSuggestPluginPatch.tar.gz added.

The "patch" to the KeywordSuggestPlugin (keywordsuggest.py)

01/04/10 15:42:31 changed by carstenklein@yahoo.de

Here is a corrected version, the former did fail when fromdb was set to False.

01/04/10 15:43:31 changed by carstenklein@yahoo.de

  • attachment keywordsuggest.py.tar.gz added.

corrected version of the patch, the former did fail when fromdb was set to false

01/05/10 06:04:06 changed by anonymous

  • summary changed from offer all keywords used up to now for selection to [Patch] Offer all keywords used up to now for selection.

11/25/11 00:33:29 changed by rjollos

  • owner changed from scratcher to rjollos.
  • status changed from assigned to new.

12/03/11 02:30:09 changed by rjollos

  • status changed from new to assigned.

If someone can redo this patch against the trunk, I'd be willing to incorporate it.


Add/Change #3816 ([Patch] Offer all keywords used up to now for selection)




Change Properties
Action