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.
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.ProjectComponent
import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript
@BaseScript FieldBehaviours behaviours
def 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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for sharing that code Raju! Saved me the time to figure it out myself :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Anybody know what the script would be to check if component has more than one entry?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What type of script?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.