Problem: I would like to institute a rule for my teams, "One component per issue", and I do not see a setting, in the administrative section of JIRA, to implement this.
Relevance: Many of our reports look into the breakdown of any given project's work by component, having multiple components per issue can, ever so slightly, misrepresent those reports.
Comments: I know I can skirt around this problem by creating a custom field but, when you are in a JIRA project, it is nice to be able to click on the puzzle icon in the sidebar and view issues by component.
If you were on Server, there's a hack you can apply to the field template which converts it to single-select. (It remains a multiple entry field in every respect, but the users can't put more than one option into it)
Cloud does not support that. Go with the custom field option (and maybe use components for something else)
You can limit the components to a list by having the project admins define the components correctly (non admins can't edit the list)
To limit it to one, find the .vm file that defines the field layout on edit and change it so it only allows for one selection, then restart Jira. From memory, it's component-edit.vm somewhere below atlassian-jira/WEB-INF/classes/template/ - a quick search should find it (it definitely has component in the file name). You may also want to edit the file for bulk change too.
I found a workaround for this on Jira Cloud.
I added two validators on one early transition in the workflow :
I duplicated these validators to other key transitions in order not have an issue later on.
For my need, it seems to do the trick.
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event