How can I Prevent creating sub-tasks if the parent issue is closed/resolved?
I am aware that we can hide the sub-task from below two ways but I am looking for a script runner script to achieve this.
- Hide the Create-Subtask UI element using one of the built-in Script Fragments. OR
- We can add workflow transition, property jira.permission.edit=false
Since we don't want to hide the sub-task create button or disable edit issue, we have added a script validator to stop creating sub-task.
Validator on subtask create workflow.
issue.getParentObject().getStatus().name != "Done"
!("Done"==(issue.getParentObject().getStatus()))
(issue.getParentObject().getStatus().getName()=='Done')
Thanks for posting this Rajiv.
Are you using a plug-in like Script Runner for this validator? Or can it be achieved without a plug-in?
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.
Hi @Rajiv Ranjan ,
Please refer below link , it may help you.
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.