We want to restrict the creation of a particular type of issuetype under an epic based on the value selected in the custom field of the same epic.For example- inside an epic i have a select list field called called "Strategic Type" and if i have selected "production" then i should be able to create just the issuetype "story" and if i have selected anything other than "production" then i should be able to create any issuetype except for "story".
Is this achievable?
Thanks in advance
Hi @Priyanka khare Do you have any plugin?
Yes, automation for jira and scriptrunner @Gustavo Félix
Ok. If I understood you...You can create a custom validator to your workflow transition.e.g.import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.issue.Issueimport com.atlassian.jira.issue.CustomFieldManagerimport com.atlassian.jira.issue.fields.CustomFieldimport com.opensymphony.workflow.InvalidInputExceptiondef epicLink = customFieldManager.getCustomFieldObjectByName('Epic Link)
def epicField = customFieldManager.getCustomFieldObjectByName("your epic field")Issue parentEpic = issue.getCustomFieldValue(epicLink) as Issueif (parentEpic.getCustomFieldValue(epicField) =="production" && issue.issueType.name != "Story"){throw new InvalidInputException("you have to select story")}
It looks like you're new here. Sign in or register to get started.