Relationship Graph

Relationship Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
0022607mantisbttaggingpublic2025-01-18 15:45
Reporterj_schultz Assigned Todregad  
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Target Version2.28.0Fixed in Version2.28.0 
Summary0022607: Clean up unused tags
Description

Over time, my users have added many tags to issues that were later removed because they were unnecessary. These tags remain in the database forever and show up in the dropdown list of suggested tags.
This can be especially problematic if e.g. several variants of a tag exist (let's say two different spellings of the same word): User A might use tag A but user B might use tag B, leading to further tag fragmentation and making the tags useless.
I know I can delete tags one by one, but for that I have to click on every single tag, check if it's unused, and then delete it manually.

Here are two suggestions:
1) In the tag list, show the number of issues this tag has been assigned to.
2) Add a maintenance button to the tag list, allowing to automatically remove any unused tags (i.e. 0 assigned issues).

TagsNo tags attached.

Relationships

related to 0035229 resolveddregad Allow direct editing of tags from Manage Tags page 
related to 0035230 resolveddregad Use generic language strings for Tags management pages 

Activities

dregad

dregad

2025-01-11 11:27

developer   ~0069663

1) In the tag list, show the number of issues this tag has been assigned to.

That's easy enough, although it comes with a performance cost as we need to count the associated bugs from the bug_tag table, but this is not a frequently-accessed page so I think it should be acceptable.

2) Add a maintenance button to the tag list, allowing to automatically remove any unused tags (i.e. 0 assigned issues).

Planning to fix this by adding a new Unused filter button, allowing to display all tags that are not attached to any issue, and a Delete action button in the list allowing easy deletion.

I don't believe it's worth introducing a dedicated button to delete all unused tags in one go.

dregad

dregad

2025-01-11 14:28

developer   ~0069668

PR https://github.com/mantisbt/mantisbt/pull/2070

Related Changesets

MantisBT: master 27b94bf3

2024-10-14 18:24

dregad


Details Diff
Tag API: allow handling of unused tags

- New tag_get_unused() function: like tag_get_all(), but only returns
tags that are not linked to any Issue.
- Add $p_unused param to tag_count()

Issue 0022607
Affected Issues
0022607
mod - core/tag_api.php Diff File

MantisBT: master 27675c41

2024-10-14 18:37

dregad


Details Diff
Manage tags: allow filtering of Unused tags

Fixes 0022607
Affected Issues
0022607
mod - manage_tags_page.php Diff File

MantisBT: master 00f92357

2025-01-06 12:19

dregad


Details Diff
Use semantically correct TH tag for column headers

Issue 0022607
Affected Issues
0022607
mod - manage_tags_page.php Diff File

MantisBT: master b22b16d0

2025-01-06 12:21

dregad


Details Diff
Show number of attached bugs on Manage Tags page

Modify tag_get_all() to get the bug count when retrieving tags from the
database; for tag_get_unused(), it's always 0.

Recycle the unused $s_tag_stats_attached language string as label for
the column header.

Fixes 0022607
Affected Issues
0022607
mod - core/tag_api.php Diff File
mod - lang/strings_english.txt Diff File
mod - manage_tags_page.php Diff File

MantisBT: master 4a020d31

2025-01-06 12:25

dregad


Details Diff
Apply $s_tag_stats_attached change to all languages

Fixes 0022607
Affected Issues
0022607
mod - lang/strings_arabic.txt Diff File
mod - lang/strings_arabicegyptianspoken.txt Diff File
mod - lang/strings_belarusian_tarask.txt Diff File
mod - lang/strings_breton.txt Diff File
mod - lang/strings_bulgarian.txt Diff File
mod - lang/strings_catalan.txt Diff File
mod - lang/strings_chinese_traditional.txt Diff File
mod - lang/strings_czech.txt Diff File
mod - lang/strings_danish.txt Diff File
mod - lang/strings_dutch.txt Diff File
mod - lang/strings_estonian.txt Diff File
mod - lang/strings_finnish.txt Diff File
mod - lang/strings_french.txt Diff File
mod - lang/strings_galician.txt Diff File
mod - lang/strings_german.txt Diff File
mod - lang/strings_hebrew.txt Diff File
mod - lang/strings_hindi.txt Diff File
mod - lang/strings_icelandic.txt Diff File
mod - lang/strings_interlingua.txt Diff File
mod - lang/strings_italian.txt Diff File
mod - lang/strings_japanese.txt Diff File
mod - lang/strings_korean.txt Diff File
mod - lang/strings_lithuanian.txt Diff File
mod - lang/strings_macedonian.txt Diff File
mod - lang/strings_norwegian_bokmal.txt Diff File
mod - lang/strings_occitan.txt Diff File
mod - lang/strings_persian.txt Diff File
mod - lang/strings_polish.txt Diff File
mod - lang/strings_portuguese_brazil.txt Diff File
mod - lang/strings_portuguese_standard.txt Diff File
mod - lang/strings_romanian.txt Diff File
mod - lang/strings_russian.txt Diff File
mod - lang/strings_serbian.txt Diff File
mod - lang/strings_serbian_latin.txt Diff File
mod - lang/strings_slovak.txt Diff File
mod - lang/strings_spanish.txt Diff File
mod - lang/strings_swedish.txt Diff File
mod - lang/strings_swissgerman.txt Diff File
mod - lang/strings_tagalog.txt Diff File
mod - lang/strings_turkish.txt Diff File
mod - lang/strings_ukrainian.txt Diff File
mod - lang/strings_vietnamese.txt Diff File

MantisBT: master d6890320

2025-01-06 12:42

dregad


Details Diff
Add tag name to delete confirmation message

Issue 0022607
Affected Issues
0022607
mod - lang/strings_english.txt Diff File
mod - tag_delete.php Diff File

MantisBT: master 89e8edd4

2025-01-06 12:50

dregad


Details Diff
Allow deletion from Manage Tags page

Add "Action" column with Delete button.

Fixes 0022607
Affected Issues
0022607
mod - manage_tags_page.php Diff File

MantisBT: master e240d754

2025-01-18 15:45

dregad


Details Diff
Remove useless variable assignment

Issue 0022607
Affected Issues
0022607
mod - core/tag_api.php Diff File