Completing subtasks prior to auto-transition

Issue #719 resolved
Scott McDonald created an issue

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)

  1. Fidel Castro Armario repo owner

    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:

    bulk_transition.png

  2. Scott McDonald 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

  3. Fidel Castro Armario 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." )?

  4. Scott McDonald 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.

  5. Fidel Castro Armario 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"))
  6. Scott McDonald 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 Screen Shot 2017-08-09 at 2.43.28 PM.png

  7. Fidel Castro Armario 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
  8. Scott McDonald 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?

  9. Scott McDonald 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.

    Screen Shot 2017-08-10 at 10.36.14 AM.png

  10. Fidel Castro Armario repo owner

    You should empty parameter Conditional execution, since the validator is doing the work of limiting the execution of parent issue.

  11. Scott McDonald 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?

  12. Fidel Castro Armario 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.

  13. Log in to comment