Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Automate the transition of the workflow status when specific subtasks are marked as complete

Ishita Avinash June 21, 2024

Could you suggest a method for transitioning the workflow status in our Jira project to a specific state when only the IT and DevOps subtasks are marked as completed?

We have X number of subtasks categorized as IT and DevOps tasks, while the remaining subtasks may still be in the open state.

2 answers

1 vote
Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 21, 2024

Hi @Ishita Avinash  Are you looking something similar? : 

Screenshot 2024-06-21 at 6.10.21 PM.png

Jovin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 21, 2024

This is far more elegant than mine @Vikrant Yadav ! And uses less automation executions... I may need to update some of my own in my environment 🙃

Like Vikrant Yadav likes this
1 vote
Jovin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 21, 2024

Hey @Ishita Avinash

This will require a bit of automation rule creation, let's go through it.

Some basics:

  • All automation rules involved below must be able to be triggered by other rules, you can turn this flag on in the "Rule Details" section
  • I assume you have a label called "IT" or "DevOps" for the purposes of this, if you use another field, simply change as required
  • I assume the Subtask has a Parent
  • I will assume the below workflows:
    • Subtasks: To Do > In Progress > Done
    • Stories: To Do > Awaiting Tasks <> In Progress > Done

Okay, assumptions out of the way - automation rule time!

Rule 1: User closed IT or DevOps Subtask

When a subtask has been closed, if the label "IT" or "DevOps" is present, this rule will log 0m work on the parent, triggering Rule 2.

  • TRIGGER: When: Issue transitioned
    • From status: Leave blank (for from all statuses)
    • To status: Done
  • IF: Add a condition: Issue fields condition
    • Field: Issue type
    • Condition: equals
    • Value: Subtask
  • IF: Add a condition: Issue fields condition
    • Field: Labels
    • Condition: Contains any of
    • Values: IT, DevOps
  • FOR EACH: Add a branch: Branch rule / related issues
    • Types of related issues: Parent
  • Add to branch: THEN: Add an action: Log work
    • Time spent: 0m
    • Date started: {{now}}
    • Work description: {{triggerIssue.Summary}} has been closed.

Rule 2: When IT or DevOps Subtask Closed, Check all Subtasks

When work is logged on this ticket, find out if all IT or DevOps subtasks are complete, if they are, transition to In Progress.

  • TRIGGER: When: Work logged
    • For: All worklog operations
  • (Optional) IF: Add a condition: Issue fields condition
    • Field: Status
    • Condition: equals
    • Value: Awaiting Tasks
  • THEN: Add an action: Lookup issues
    • JQL:
      parent = {{issue.key}} AND labels IN (IT, DevOps) AND status != Done
  • IF: Add a condition: {{smart values}} condition
    • First value: {{lookupIssues.size}}
    • Condition: equals
    • Second value: 0
  • THEN: Add an action: Transition issue
    • Destination status: In Progress

Should be all good then!

Ishita Avinash July 31, 2024

Hi Team,

I apologize for my delayed response. I would appreciate your assistance with a couple of queries related to a project I'm working on. The project includes a rule that transitions the main issue status to "IT-Finance complete" when specific subtasks, with prefixes "IT" and "Fin," are marked as "Done." I have two questions:

1. JQL Query and Transition Rule: I need help reviewing my transition rule and JQL query. Could you please examine the screenshot I’ve attached and suggest any improvements? Specifically, I’m looking for advice on how to consolidate the five subtasks into a single JQL query.test p.png

2. Duplicate Email Notifications: We have another rule that sends an email notification when the status is changed to "IT-Finance setup complete." However, this rule is sending duplicate emails simultaneously. Can you help identify the cause of these duplicate emails and provide guidance on how to resolve this issue?

Thank you in advance for your help!Screenshot 2024-07-31 174916.png

Suggest an answer

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

Atlassian Community Events