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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok. If I understood you...
You can create a custom validator to your workflow transition.
e.g.
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.fields.CustomField
import com.opensymphony.workflow.InvalidInputException
def epicLink = customFieldManager.getCustomFieldObjectByName('Epic Link)
def epicField = customFieldManager.getCustomFieldObjectByName("your epic field")
Issue parentEpic = issue.getCustomFieldValue(epicLink) as Issue
if (parentEpic.getCustomFieldValue(epicField) =="production" && issue.issueType.name != "Story"){
throw new InvalidInputException("you have to select story")
}
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.