Description
Feature Description
Sometimes, old labels should not be used anymore.
For Gitea, for example, those are the backport/v*
labels.
Currently, the only way to stop them from polluting the search results when trying to assign labels to an issue or PR is to delete them completely.
However, this has the drawback that any old issue/PR that had that label loses it, thus losing information.
Instead, it would probably be better to filter out archived labels from the search results and keep them for anything that already has these labels.
So, in a sense, what I propose is a sort of soft deletion for labels (except instead of a boolean we store a timestamp that means unarchived when 0
and displays when this label was archived).
This also aligns with milestones and projects as you can close both already, which is their equivalent of archiving.
Labels are currently an outlier in their behavior among the "three scrum tools".
Proposed Approach
- Add a checkbox
archive(d)
on theedit label
screen (and to thePATCH
API route/repos/{owner}/{repo}/labels/{id}
) - when editing a label and it is newly archived, store
ArchivedUnix timestamp(now)
inside the db - when a label is edited and no longer archived, set the archived timestamp to
0
- when viewing a specific issue/ the issue list, display all labels on all issues
- Behavior unclear yet:
- when assigning labels to an issue, should we only suggest unarchived labels?
- when viewing the issue list, should we suggest searching by archived labels as well?
- in both these cases, these are the available approaches:
- add a checkbox
include archived labels
inside the suggestion box that is de-selected by default, and re-triggers the search when changed. Needs a lot of UI changes - do not suggest them unless they are entered exactly into the search field. Doesn't need a lot of UI changes except it should only be shown when the name matches exactly
- add a checkbox
- do we count the number of unarchived labels or the number of all labels as the number of labels?