Issue priority should be determined by combination of label priorities instead of highest label priority
With 8.9, we're getting label priorities (https://gitlab.com/gitlab-org/gitlab-ce/issues/14189) and the ability to sort the issue and MR indexes by Priority, which will sort the issues based on the priority of their assigned labels.
Currently, the priority of each issue is determined by the priority of the highest priority label it has assigned. This works relatively well, but falls apart when an issue has multiple labels assigned, since the second label will not be taken into account. The effect is that two issues with the same highest priority label, but a different second priority label, will not be ordered as expected.
Depending on factors local to the DB, the ordering could look like this:
- Issue title [High] [Low]
- Issue title [High]
- Issue title [High] [Medium]
Instead of:
- Issue title [High] [Medium]
- Issue title [High] [Low]
- Issue title [High]
The intention was always to implement it like this (https://gitlab.com/gitlab-org/gitlab-ce/issues/14189#note_4360653), but after a lot of brain cycles were spent by @thijs-wouters, @yorickpeterse, @smcgivern and me on figuring out an efficient way to solve it (https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3205#note_4360810 and subsequent discussion), it was ultimately shelved (https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3205#note_4382181) as no good solution was found.
Now is the time to figure it out once and for all, since the sorting functionality loses a lot of usefulness in a multi-label flow like we use.
@yorickpeterse @smcgivern Now that a few months have passed since we last discussed this, does looking at it with a fresh mind give any new ideas?