Disallow the creation of duplicate labels and milestones anywhere within a Group and all of its descendant subgroups and projects
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=18034) </details> <!--IssueSummary end--> ### Problem To Solve If I have a group/subgroup/project hierarchy, it is very easy to accidentally create duplicate labels and milestones, which have cascading effects given our inheritance model. This leads to super confusing interactions when you need to apply a label or milestone to an issue. For example: ![Screen_Shot_2020-08-28_at_10.27.11_AM](https://gitlab.com/gitlab-org/gitlab/uploads/f5d0182869a7ff014a4aedf4eb218298/Screen_Shot_2020-08-28_at_10.27.11_AM.png) ### Proposal **TL;DR:** There should only ever be 1 label of the same name within any hierarchy on groups/sub-groups/projects. If there is a more efficient way to accomplish this outcome, please proprose it! In the following proposal, label and milestone are interchangeable: - [ ] When create a group label and there is a duplicate label that exists in a subgroup or project, allow for that label to be promoted to the current group that is trying to create the duplicate label. - [ ] If they decline to promote the label, display an error message indicating that there cannot be duplicate labels anywhere in a group hierarchy. - [ ] Prevent any subgroup or project from creating a duplicate label. I should not be able to create the same label in [this subgroup](https://gitlab.com/tech-marketing/demos/gitlab-agile-demo/large-co/sector-alpha) because on already exists within the parent group, nor should I be able to in [this subgroup](https://gitlab.com/tech-marketing/demos/gitlab-agile-demo/large-co/sector-alpha/lob-1), nor in [this subgroup](https://gitlab.com/tech-marketing/demos/gitlab-agile-demo/large-co/sector-alpha/lob-1/app-a). - [ ] Allow existing duplicative labels to be promoted to any parent group -- and merged gracefully with the existing label at the parent group level. - [ ] If a label is promoted to the top-most parent, check all other sub-groups and automatically promote any other duplicate labels. ### Don't Do... - Migrations to automatically correct duplicative labels. ### UX #### Select Target Group For Promotion [See interactive prototype](https://www.figma.com/proto/6NcaJvNnqZKvSSEfAyLAcl/18034?node-id=4%3A23&viewport=449%2C200%2C0.2514156401157379&scaling=min-zoom) #### Inline Validation ![inline creation](https://gitlab.com/gitlab-org/gitlab/uploads/64b55609c33e2666bc5e09523c3bbf8e/New_label_-_Issues.png) #### Create Label From Label List Validation ![Validation](https://gitlab.com/gitlab-org/gitlab/uploads/ba648cdcafa03c8ef4df607cd823cc2c/New_label_-_Labels.png) #### Displaying Canonical Label Source Current conversation is ongoing (https://gitlab.com/gitlab-org/gitlab/-/issues/18034#note_348660035) <!-- triage-serverless v3 PLEASE DO NOT REMOVE THIS SECTION --> *This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.* <!-- triage-serverless v3 PLEASE DO NOT REMOVE THIS SECTION -->
issue