How can I make component's single select?
You can't natively. Options though:
I'm not averse to option 2 if you need a global change, but it does add testing burden to your upgrades. Option 3 is probably the best one.
Anybody know what the script would be to check if component has more than one entry?
What type of script?
I added a solution for the JIRA version 6.4.13 in the ticket
JRA-12543 - Need ability to change project component field type from multi select to single selectCLOSED ,
hope it helps.
Groovy / Script Runner
As follow up to Nic's answer, I'm listing here how one can do using Script Runner Behavior
import com.atlassian.jira.bc.project.component.ProjectComponentimport com.onresolve.jira.groovy.user.FieldBehavioursimport groovy.transform.BaseScript@BaseScript FieldBehaviours behavioursdef components = getFieldById("components").getValue() as List<ProjectComponent>if (components.size() > 1){ getFieldById("components").setError("Please select only one component related to your work.")}else{ getFieldById("components").clearError()}
Hope that helps to anyone who still looking for easy way to get it done for specific project.
Thanks for sharing that code Raju! Saved me the time to figure it out myself
It looks like you're new here. Sign in or register to get started.