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:
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"
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.
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?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Could you please help me with correct solution and steps .
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Venkata Sagar ,
can you please try with below workflow property at close status.
jira.issue.editable = false
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Sreenivasaraju P ,
But , i need for specific issue type ,So how can i meet that criteria with this workflow property.
And i think this property won't provide to edit the issue
Please Help me
Thanks
Sagar
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.