Hi ,
I want to block subtask creation when the parent issue is done status.
Thanks
The easiest way to achieve that is to use Simple Scripted Validator on Create transition for the sub task issue type(s) with following snippet:
issue.parentObject?.status.name != "Done"
An error message will be displayed only when the user click on the create button:
Hi @Venkata Sagar ,
You can try with script runner plugin.
Please refer below link.
https://community.atlassian.com/t5/Jira-questions/I-Want-to-Hide-the-Creating-Sub-Task-option-when-the-Ticket/qaq-p/897428
Hi @Sreenivasaraju P ,
I have done those but it is not working!!
Thanks,
Sagar
Could you please help me with correct solution and steps .
Hi , In Subtask workflow and in Create Transition ,I have added a validator , that is Script Runner Validator
import com.atlassian.jira.issue.Issue issue.getParentObject().getIssueTypeObject().getName() != 'Story'
But it is not working, Please Help me
thanks
I didn't see that you just need for a single parent issue type. You can use:
issue.parentObject?.status.name != "Done" || issue.parentObject?.issueType.name != "Story"
Hi @Max Lim _ScriptRunner_ ,
Thank you for the Response, It is working as Expected .
We have a similar issue and the script is not working quite how we would like. We have a workflow with the issue types Epic, Task, and Sub-task. We also have a separate workflow with the issue type Request. The script is blocking the Sub-task creation as expected, but is also blocking the ability to create Epic and Tasks that follow the same workflow. Ideally we would like Sub-tasks to be blocked if the Request issue type is Closed/Done, but it is fine if it applies to all. Any ideas?
It looks like you're new here. Sign in or register to get started.