I would like to have the transition visible only if appropriate subtask exists and it is resolved.
I wrote:
import com.atlassian.jira.component.ComponentAccessor
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def cf = customFieldManager.getCustomFieldObjectByName("Test type")
def subtasks = issue.getSubTaskObjects().findAll { it.issueTypeObject.name == 'Sub Test Execution' && it.getCustomFieldValue(cf)?.value == "Development test"}
issue.subTaskObjects && !subtasks.any { subtask -> !subtask.getResolutionObject() }
But looks that issue.subTaskObjects (in my opinion it should check if such subtask exists) doesn't work.
Could you help me ?
Thanks in advance
I have found the solution: It shouldn't be issue.subTaskObjects but subtasks and it works
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Gala,
Could please how does it worked, whats the code you used?
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.