I have tried a few suggestion, posted on the Forum, to limit sub-task issue creation, based on parent issue issue type.
The first one was suggested here: https://community.atlassian.com/t5/Answers-Developer-Questions/Restrict-type-of-subtask-that-can-be-created-for-a-given-parent/qaq-p/555827 ):
This simple scripted validator on Create transition in sub-issue workflow could do required check:
["Task", "Bug"].contains(issue.parentObject?.issueTypeObject.name)
Mine looked like this:
["Program"].contains(issue.parentObject?.issueTypeObject.name)
It gave me this error:
There was an error during the execution of your Jira expression
Jira expression failed to parse: line 1, column 1: let, IDENTIFIER, ;, !, -, typeof, (, null, true, false, NUMBER, STRING, TEMPLATE_LITERAL, new, [ or { expected, encountered.
Then I've tried another solution, suggested here: https://community.atlassian.com/t5/Jira-questions/How-can-I-disable-the-menu-options-for-Create-sub-task-and/qaq-p/805084
issue.getParentObject().getIssueTypeObject().getName() != 'Incident'
Mine looked like this:
issue.getParentObject().getIssueTypeObject().getName() == 'Program'
It didn't work either - the error message is too long to publish here.'
Could anyone please let me know what am I doing wrong? Is it because we are in Jira Cloud? I'd greatly appreciate any help. Thank you in advance.
Hello @Gregory Kremer ,
Yes, the suggestions you are referring to are related to server environments. In Cloud, you have to use Jira expression, which is described here: https://developer.atlassian.com/cloud/jira/platform/jira-expressions/
In your case, the validator would look like this:
issue.parent.issueType.name == "Program"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.