Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

validate subtask statuses using validator

Tanu
Contributor
October 30, 2019

I have written a simple scripted validator to check the status of my subtasks before going to next step, but it doesn't look like working neither i m getting any errors for my code :-

 

import com.atlassian.jira.component.ComponentAccessor;
import org.apache.commons.lang.StringUtils;
import com.atlassian.jira.issue.Issue;

def subTasks = issue.getSubTaskObjects()

subTasks.each {
if (it.status == "Complete")
print(it.status);

return true;

 

 

 

Please help !

1 answer

0 votes
Jack Nolddor _Sweet Bananas_
Atlassian Partner
October 30, 2019

Hi Tanu, could you further explain what your requirement is?

Do you want to hide a transition within the parent until all subtask get resolved?

Tanu
Contributor
October 30, 2019

No i do not want to hide my parent issue at all, that's the reason i am not using condition because if i use condition my parent issue will remain hidden until my condition is fullfilled, so looking for validator.

Simple scripted validator will do i think, just want a proper code as my code is not working, 

 

If any better suggestions i would be really happy to implement that 

Suggest an answer

Log in or Sign up to answer