Author: John Reese
One of the biggest movements in the modern web communities is the push towards 'tagging' articles and topics with short descriptive keywords that represent the content and can be used to find items with the same subject. Mantis currently can only classify issues by project and category, which can be limiting, and only allows one classification per issue. By implementing tagging, it would allow users to attach multiple keywords to each report, which could be new tags typed in manually or existing tags selected from a list, either through AJAX auto-completion, or a popup window of some fashion.
Because of the 'metadata' nature of tagging, it would not be primary method of classification for issues (which would still be left to categories), and could allow for lower permission requirements for tagging reports, such as allowing any registered reporters to add tags at any time. It could also allow for potential custom auto-tagging features, where certain tags could be automatically attached to any bug containing special characteristics, like a report with version control checkins.
All tags will be stored in a database table, with a separate table containing foreign key links between bugs and tags. A tag may only be attached once to each report. By default, anyone with reporter access will be able to create and attach tags to a report, and will be able to detach only the tags they attached. Developers will have access to edit tags and detach any tags from bugs. By default, tags will be separated by commas so that multi-word tags can be used, but it can be configured to use spaces, or any other character, instead.
When viewing a page for a specific tag, the user should be shown information about the tag, including a description, the user who created it, when it was created and last updated, how many bugs it has been attached to, and five tags that were attached the most to the same bugs. If the user has high enough access (see threshold configuration), then they should be able to edit the tag's name and description.
When using the filters page in normal mode, a simple multi-select box containing a list of tags will be used to choose what tags to filter on. In advanced mode, a free text input will be used, where the user can list out tags to filter on, in the form '+tag', 'tag', or '-tag'. In this manner, any tag noted with a '+' must be attached to any resulting bug, any tag noted with '-' must not be attached to any resulting bug, and resulting bugs must have any of the un-denoted tags attached, but not necessarily all of them. The system will use a case-insensitive search on existing tags, as well as looking for existing tags with or without a trailing 's' to match and use existing tags before creating new and redundant tags.
The initial implementation will not provide these features, but they could be included in future updates:
tagging_separator(default to ','), use trim() on each tag after explode() to account for “word, word” etc.
tagging_view_threshold(VIEWER) to see tags attached to bugs
tagging_attach_threshold(REPORTER) to attach tags to bugs
tagging_detach_threshold(DEVELOPER) to remove tags from bugs
tagging_detach_own_threshold(REPORTER) to remove tags attached by the same user
tagging_create_threshold(REPORTER) to create new tags when attaching to bugs
tagging_edit_threshold(DEVELOPER) to edit tag names and descriptions
tagging_edit_own_threshold(REPORTER) to edit tags created by the same user
Any feedback should be placed below.
First Review by vboctor:
Second Review by vboctor: