Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

restrict components to single choice

BlueKai Support
Contributor
January 17, 2013

Is it possible to restrict the components field to be a single choice?

The reasons is for GreenHopper. We have scrum boards which key off components. When users select multiple choices, the ticket (story) is visible in 2 boards. Then 1 story gets put in an active sprint and locks out the other team from starting a sprint, because they see the 1st teams sprint with that overlapping ticket.

That is actually the core problem. But if you can answer my question, or give workarounds, that'd be helpful.

4 answers

1 accepted

4 votes
Answer accepted
BlueKai Support
Contributor
January 22, 2013

Atlassian support gave a pretty good workaround

Add an additional validator in the transition to check only a single selection is made for the component. Use the validator "Field Has Single Value" JIRA Misc Workflow Extensions for this.

Its a tedious if you have alot of steps, but does work.

Piyush_Annadate
Contributor
July 31, 2018

Updating workflow will be a issue here; any way to do this by 'Behaviour or script runner'?

1 vote
Dave Drexler September 14, 2017

I think I have a relatively simple way to do this: 

  1. Create a single-choice custom field whose options match the project's list of Components.
  2. Put the new custom field on your Create screen, and the Components field on your Edit/View screen.
  3. Make the custom field required, and the Components field optional.
  4. Add two post-functions to the **beginning** of the Create transition:
    1. Copy from field to field (I think this is a JSU function) and copy from custom field to Components.
    2. Assign to Lead Developer.

Make sure the spelling of the options in the custom field matches the Components **exactly** - eg, no trailing spaces. 

Downside is you'll have to keep the custom field options in sync with the Components list.

0 votes
David Skreiner
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 2, 2016

Unfortunately, expensive addons are not an option for some JIRA admins, and may lead to problems with urgent JIRA updates.

Any way of doing this without addons?

Toni Takei May 9, 2019

Were you able to find a solution to this without having to use add-ons?

0 votes
C_ Faysal
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 17, 2013

i don't think components can be restricted to a single choice only.

but board filters can be modified.

so if Board1 never handles issue where Component1A and Component1B is chosen add

AND component not in (Component1A, Component1B)

will this work for you?

Suggest an answer

Log in or Sign up to answer