How to update Parent User Story based on only select Sub-tasks within? (not all)

Dan H May 12, 2023

Hello, I would like to transition the parent User Story ticket based on the transition of CERTAIN select custom sub-tasks within it. For Example:

Only if ALL Alpha + Beta + Charlie sub-tasks are transitioned to DONE, then update Parent transition to READY. Delta sub-task should always be exempt.

So rule should trigger if:

  • (Parent US = READY)
    • Alpha sub-task = DONE
    • Beta sub-task= DONE
    • Charlie sub-task = DONE
    • Delta sub-task = TO DO

However rule should NOT trigger if:

  • (Parent US = NOT READY)
    • Alpha sub-task = DONE
    • Beta sub-task= IN PROGRESS
    • Charlie sub-task = DONE
    • Delta sub-task = TO DO

1 answer

1 accepted

1 vote
Answer accepted
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 12, 2023

Hi @Dan H - How are you delineating the types of sub-tasks?  Are these custom sub-task issue types or are you using some type of component/field/label to distinguish them?  This will help in crafting a response.

Dan H May 12, 2023

Yes apologies, I will mention this above.

They are all custom sub-tasks as I thought having this would make this rule much easier to put together.

Sub-task types:

  • Code sub-task
  • Art sub-task
  • QA sub-task
  • etc
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 12, 2023

All good - So, I would do something like this:

  • TRIGGER: Issue Transitioned (To Done)
  • CONDITION: Issue Type is one of (Alpha, Beta, Charlie)
  • ACTION: Lookup Issues
    • Parent = {{issue.parent}} AND issueType IN (Alpha,Beta,Charlie) AND statusCategory != Done
  • CONDITION (Advanced)
    • {{lookupIssues.size}}
      Less Than
      1
  • BRANCH (Parent)
    • CONDITION: Status = NOT READY
    • ACTION: Transition Issue (To Ready)

Quick summary:

  • Triggers on any issue transitioning to done
  • Verifies the issueType
  • Looks for other issues sharing the same parent that are NOT done
  • Only proceeds if no issues are found
  • Branches into the parent
  • Verifies the parent is in NOT READY
  • Transitions the parent to READY
Dan H May 12, 2023

This works brilliantly and does exactly the job, thank you very much for your help with this!

Like Mark Segall likes this
Dan H May 19, 2023

Just updating to say found an edge case in the flow that resulted in an error (below), but resolved by adding the following:

  • BRANCH (Parent)
    • CONDITION: Some Issue Types = Delta
      • Checks if Delta sub-tasks even exist for the Parent ticket
    • CONDITION: Status = NOT READY
    • CONDITION: Some Issue Types != Delta AND Status = Done
      • Checks if Alpha, Beta, Charlie sub-tasks even exist AND are in Done
    • ACTION: Transition Issue (To Ready)

The error was:

Transition issue
Destination status could not be resolved. If using a smart-value ensure this resolves to a numeric status ID or untranslated name for issues (with current status):
[Parent ticket ID] (In Progress - 3)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events