Forums

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

Validation: validate that subtask of a specific type is in a certain status for transition

Ricardo Gomes
Contributor
August 24, 2020

Hi,

We have to validate and only allow the transition of a parent story ticket when its specific subtask ticket type "Definition of Done" is in "Closed" status. Is that something that I can use JMWE to build a custom validation for?

That validation would occur when the transition screen modal is displayed - if the associated subtask is not in closed status then I'd like to display a message for the user on that modal. 

I think I found the answer using the linked issue JMWE validation option but what happens if the ticket I'm validating doesn't have a sub-task with that type (not all tickets have the DoD subtask)? Do I have to add a conditional that checks to see if the ticket in question has that sub-task first?

I tried entering the following conditional but I can't figure out the correct syntax:

!issue.get("subtasks")?.any{it.getIssueType().getName() == "DoD - Definition of Done"}

 

Please advise.

Thanks!

 

 

 

 

1 answer

1 accepted

0 votes
Answer accepted
David Fischer
Community Champion
August 24, 2020

Hi,

you can use the "Linked Issue Status Validator" that can do exactly what you're looking for without a single line of code - you can select the link type (Is Parent Of), the issue type of the sub-tasks to check ("Definition of Done") and the statuses these particular sub-tasks need to be in ("Closed").

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events