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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.