Completing subtasks prior to auto-transition
Hello @fcarmario,
Here's my use case: All Subtasks must be completed before the status can change to Access Disabled.
The addition to that is: Can subtasks be transitioned based on a value in the summary field or can they be only moved via the status of the ticket?
I would like to transition all tickets that don't have the word "Access" in the summary?
Thank you,
Scott
Comments (16)
-
repo owner -
reporter Could I use Validation on linked issues in the Access Disabled transition and also a write field on linked issues or subtasks post-function as a solution?
If so, can you assist in building that logic?
Regards,
Scott
-
repo owner In your last question, are you referring to your second requirement (i.e. "I would like to transition all tickets that don't have the word 'Access' in the summary." )?
-
reporter No, it's for the first and only requirement. Once all subtasks are completed and in a "closed" status, the parent ticket automatically transitions to the next step in the workflow.
-
repo owner Use "Copy a parsed field to a field" post-function in transition to "Closed" status in subtask's workflow with the following configuration:
- Target field: Issue status
- Parsing mode: basic
- Text to be parsed...:
Access Disabled
- Conditional execution:
count(siblingSubtasks()) = count(filterByStatus(siblingSubtasks(), "Closed"))
-
reporter Why would the following logic still give present a message stating all subtasks need to be closed? I want all Subtasks with the issue type name of "Stand Down - Access" to be completed before the status on the parent ticket can change to Access Disabled.
I have verified all stand down - access subtasks in my parent ticket are closed with the resolution done but I'm still unable to move the parent ticket.
Regards, Scott
-
repo owner Hi @scottjmcdonald,
You should check parameter "Allow unselected issue types".
BTW, if you are using that validator, you should use the following configuration in "Copy a parsed field to a field" post-function in transition to "Closed" status in sub-tasks workflow for automatically closing the parent issue when all the sub-tasks is closed:
- Target field: Issue status (delayed writing)
- Parsing mode: basic
- Text to be parsed...:
Access Disabled
-
reporter The allow unselected issue types resolved the issue.
The other copy a parsed field to a field post function, didn't automatically close the parent issue. All the sub-tasks are closed but it didn't auto-transitions. I have tickets without the text Access Disabled so perhaps I need to account for that in my parsing mode?
-
repo owner Sorry, use Parent's issue status (delayed writing) as target field.
-
reporter The parent task still isn't transitioning to close (even after refreshing the browser). I've attached a screenshot of the post-function logic I have in each of my sub-tasks 'Closed' status.
-
repo owner You should empty parameter Conditional execution, since the validator is doing the work of limiting the execution of parent issue.
-
reporter Still not working. Do I need to change the parsing mode?
-
reporter lets scratch this. Lets make the ask a little cleaner. Can parent tickets be auto-transitioned to a status based on the status of their a sub-tasks?
-
repo owner Yes, they can.
If you want to move parent issue to "Access Disabled" status when all the "Stand Down - Access" sub-tasks are in statuses "Closed" or "Done", then you should insert "Copy a parsed field to a field" post-function into transitions to statuses "Closed" and "Done" in workflow of "Stand Down - Access" issue type with the following configuration:
- Target field: Parent's issue status (delayed writing)
- Parsing mode: basic
- Text to be parsed...:
Access Disabled
- Conditional execution: keep this parameter empty
Add this post-function in first position in execution order. In reality we only need to guarantee that it's executed before post-function for firing the event in the transition.
I'm assuming that you have the validator on subtasks you described in a previous post in transition to Access Disabled status in parent's workflow.
-
reporter That did the trick! thank you.
-
repo owner - changed status to resolved
You are welcome.
- Log in to comment
In order to meet your requirement "All Subtasks must be completed before the status can change to Access Disabled." you can use "Validation on subtasks" in transition to "Access Disabled" status parent's workflow.
Please, let me know if you have any trouble with the configuration of the validation.
In relation to requirement "I would like to transition all tickets that don't have the word "Access" in the summary." you can simply do a JQL search with the following query
summary !~ "Access"
and then use "Bulk Change" to transition all the issues returned in the search. Look at the screenshot: