On this page
Use case
Check whether the parent of the current issue is of a certain issue type.
This is particularly important if you want to reuse a workflow for multiple sub-task issue types but only want a transition to be available if the sub-task belongs to a certain user story or a bug.
This use case is valid for both conditions and validators. The only difference is that you can specify an additional error message when using a validator.
Configuration
Jira expression*
issue.parent != null && (issue.parent.issueType.name == "Story")
This expression makes sure that:
- the current issue has a parent (only for sub-tasks)
- the parent is a Story
Variations
You can easily modify this use case to check for specific statuses.
Jira expression*
issue.parent != null && (issue.parent.issueType.name == "Bug") && ((issue.parent.status == "To Do"))
This expression makes sure that:
- the parent is a Bug
- the Bug is still in the TO DO status
Jira expression*
issue.parent != null && (issue.parent.issueType.name == "Bug") && ((issue.parent.resolution != null))
This expression makes sure that:
- the parent is a Bug
- the Bug is still unresolved.
Related examples
ADVANCED BEGINNER BEGINNER BEGINNER INTERMEDIATE BEGINNER INTERMEDIATE BEGINNER INTERMEDIATE INTERMEDIATE INTERMEDIATE BEGINNER BEGINNERUse case JWT feature Workflow function Complexity Block a transition based on issue links Block a transition based on sprint information Block a transition based on the day of the week Block a transition if a predefined field value has not been changed Block a transition if some issues under an epic are not in a certain status Check current issue status Check for unresolved sub-tasks Check if an attachment was added recently Check parent issue type Check the number of times that a field has changed Evaluate the Parent Link field Evaluate worklogs in sub-tasks Validate an issue only if a comment is written during the transition Validate worklogs
If you still have questions, feel free to refer to our support team.