Is there a way for an issue to automatically be assigned to a specific Component at creation? Can it be based on the Epic Link?
Thanks,
Dave
Hi @Dave Frohwitter ,
This is not possible with out of the box JIRA. It is possible to set a fixed Component, but not one that follows a condition!
The only way to do this would be to use a plugin like Scriptrunner and create a script listener.
Here is an example :
https://community.atlassian.com/t5/Jira-questions/set-Component-in-groovy-script/qaq-p/196655
import com.atlassian.jira.ComponentManager import com.atlassian.jira.issue.CustomFieldManager import com.atlassian.jira.issue.Issue import com.atlassian.jira.issue.MutableIssue import com.atlassian.jira.issue.comments.CommentManager import com.atlassian.jira.issue.fields.CustomField import com.atlassian.jira.util.ImportUtils import com.atlassian.jira.user.util.DefaultUserManager import com.atlassian.crowd.embedded.api.User import com.atlassian.jira.project.Project MutableIssue issue = issue Project project = issue.getProjectObject() def component = componentManager.getProjectComponentManager().findByComponentName(project.getId(),'ComponentName') issue.setComponentObjects([component])
Hope this helps, let me know if you decide to proceed with this solution and need further help with the script.
JT
Earning the Mindful Member badge proves you know how to lead with kindness, plus it enters you into a giveaway for exclusive Atlassian swag. Take the quiz, grab the badge, and comment on our announcement article to spread the good vibes!
Start here
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.