I am unable to properly set a Sub-task Status in Post Function transition
Parent Issue A0
Sub-task Issue B1 - Status WAITING FOR SUPPORT
Sub-task Issue B2 - Status WAITING FOR SUPPORT
Sub-task Issue B3 - Status WAITING FOR SUPPORT
Sub-task Issue B4 - Status PENDING
Any Sub-task B1, B2 or B3 can be moved to RESOLVED in any order (any sequence), there are NO links. The only relationship is that they are sibiling sub-tasks.
When B1, B2 and B3 are all set to RESOLVED, the sub-tasks B4 must move from PENDING to WAITING FOR SUPPORT.
I am attempting to accomplish this using a POST FUNCTION in the RESOLVED transition.
I tried using a JQL search, however it transitions EVERY sub-task, not just the siblings from the Parent Issue
Comments (10)
-
repo owner -
reporter Hi Fidel,
This works perfectly, I just got a new request to change the way the Last sub-task is Transitioned. I addition to what we have now, I need to add a Conditional Execution on the following -
If the sub-tasks Parent Issue has ANY linked Issues in different project, and these Linked issues are Resolved or Closed, then the Last Sub-task should be transitioned.
So Parent Issue A0 could have Linked Issue C1 Lined Issue D4 Linked Issue E7
All of the Linked issues should be closed.
-
repo owner Hi @zarco44,
I need some clarifications. Please, tell me which of the following sentences is true:
-
Sub-tasks in "Pending" status should be transitioned to "Waiting for Support" if all sibling sub-tasks are in "Resolved" status and parent's linked issues issues to other projects are in Resolved or Closed status.
-
Sub-tasks in "Pending" status should be transitioned to "Waiting for Support" if all sibling sub-tasks are in "Resolved" status or if parent's linked issues issues to other projects are in Resolved or Closed status.
-
-
reporter - Sub-tasks in "Pending" status should be transitioned to "Waiting for Support" if all sibling sub-tasks are in "Resolved" status and parent's linked issues issues to other projects are in Resolved or Closed status.
-
repo owner Then we need to add a post-function in transitions to "Closed" and "Resolved" status in the workflow of linked issues, since we can have all the sibling sub-tasks in "Resolved" status, but still linked issues to be Closed or Resolved.
Don't you have a restriction on issue link types, or do you want to include all the linked issues in this requirement?
-
reporter That would be an issue, I was hoping for the logic to stay in only the Sub-task workflow and see if there was a way to count both Sub-tasks and the Parent's linked issue statues.
-
repo owner It's not possible to keep the logic only in the sub-tasks workflow, since we can have all the sibling sub-tasks Resolved, and linked issues still to be Closed or Resolved.
What we can do is to prevent the last sibling sub-task from being Resolved until all the parent's linked issues are Closed or Resolved. We can do it by using a validator in transition to Resolved status in sub-tasks workflow. What do you think of this solution?
-
reporter Yes, I could try that.
-
reporter The validator will not work, they need to close the linked issues and sub-task independently of each other. Thank for the info, You may close this issue.
-
repo owner - changed status to resolved
- Log in to comment
Hi @zarco44,
You should use "Write field on issues returned by JQL Query or Issue List" post-function in transition to "Resolved" status in your sub-task's workflow with the following configuration: