Is there a way to create a fast track transition on any type of subtask? I tried type in subTaskIssueTypes(), but it failed. The example issue.issueTypeObject.name == 'Bug' is not helpful, it would mean one post function for every type of subtask.
Any other way possible?
try issue.issueTypeObject.isSubTask()
you can check it here
https://docs.atlassian.com/jira/latest/com/atlassian/jira/issue/Issue.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks! Works perfectly :-)
Is there somewhere a list of valid functions?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
A good entry point is Atlassian API Reference
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried something similar with a task (not subtask) - what would be the function?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't know if I understand your question... to identify a Task you could use issue.issueTypeObject.name == 'Task'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK, my question wasn t very precise. I have a transition that should only be valid for tasks, not subtasks. The condition all subtasks closed is not enough, as it also accepts subtasks, so I wanted to add a condition on the different task types, without writing it for every one individually.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can combine any from the above mentioned condition by "||" (or).
def issueType = issue.issueTypeObject return (!issueType.isSubtask()) || issueType.name == 'Task')
Or you can create an array of valid issue type names.
['Task','Question','Bug'].contains(issue.issueTypeObject.name)
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.