I would like to prevent users from converting a parent issue to a sub-task if the selected parent when converting the ticket is already closed.
I have tried with a validator but this didn't stop the following from proceeding.
if(parentIssue.getProjectObject().getKey() == 'projkey'){
// Check if the parent issue is closed
if (parentIssue != null && parentIssue.getStatus().getName() in ['type1', 'type 2', 'No Issue']) {
throw new InvalidInputException("You cannot create a subtask because the parent issue is closed.")
return false
}
}
I've not used this against moving issue, but maybe you can try with workflow properties:
jira.issue. |
Make an issue editable when it has a particular status. By default, if this property isn’t set, issues are always editable. |
true |
Disable editing when an issue has a particular status. This may be helpful when the issue is at the final stage of the process and has some of the finalizing statuses like Done. | false |
Source: https://confluence.atlassian.com/adminjiraserver/workflow-properties-938847526.html
Let us know if it worked
Thanks a lot @Lucas Modzelewski _Lumo_ .
That solved the issue.
I really appreciate the quick response.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.
Learn more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.