JIRA Automation: Set issue status when subtask is assigned

Christian Fischer
Contributor
November 23, 2023

We work with subtasks and our manualy rule is, that when the first person is assigned to a subtask then this person has to set the issue status to "In Progress".

How can I do that automaticly?

There is no "Subtask assigned" trigger and as i tried "Issue assigned" is not triggered ba a subtask.

So how do I set this up?

Thanks for any hint!

2 answers

1 accepted

1 vote
Answer accepted
Tim C
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 23, 2023

Hi @Christian Fischer 

Welcome to the Atlassian community ...

I think something like this should be fine ... see below:

Screenshot 2023-11-23 122542.png

I hope this helps.

Thanks,

Tim C

Christian Fischer
Contributor
November 23, 2023

I tried something similar and now this one.

This rule sets the status of the subtask to "In Progress". But I would like to have the story to have this status.

Tim C
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 23, 2023

Updated ...

Screenshot 2023-11-23 123739.png

Christian Fischer
Contributor
November 23, 2023

THANKS A LOT!
So fare I didn't know the branch "Parent". This was the missing part in the rule!

GREAT!

Like Tim C likes this
Tim C
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 23, 2023

Great - glad that you're now sorted.

Please accept above answer so that the question shows as "solved".

0 votes
Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 23, 2023

Hi @Christian Fischer 

This should work:

  • Trigger: Issue Assigned
  • Condition: Issue Fields Condition
    • Field = Issue Type
    • Condition = equals
    • Value = Sub-task
  • Condition: Issue Fields Condition
    • Field = Status
    • Condition = does not equal
    • Value = In Progress
  • Action: Transition Issue
    • Destination Status = In Progress

---

This would execute each time a user is assigned though - is that the right behaviour? Or is it only when the first user is assigned?

If the latter, is it possible to move to other statuses and back to In Progress within your workflow?

Let us know if this works for you!

Ste

Christian Fischer
Contributor
November 23, 2023

See my answer below. This rule does not set the status of the story like I want to be set automaticly. It sets the status of the subtask.

Wheen the first subtask is assigned then the status of the story should be set to "In Progress".

Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 23, 2023

Hi @Christian Fischer 

Apologies, I wasn't sure which option was required above.

Rule would look something like this:

  • Trigger: Issue Assigned
  • Condition: Issue Fields Condition
    • Field = Issue Type
    • Condition = equals
    • Value = Sub-task
  • Condition: Issue Fields Condition
    • Field = Assignee
    • Condition = is not empty
  • Branch: Related Issues
    • Type = Parent
      • Branch-Condition: Issue Fields Condition
        • Field = Status
        • Condition = does not equal
        • Value = In Progress
      • Branch-Action: Transition Issue
        • Destination Status = In Progress

---

Again, this would execute for every Sub-task not just the first one.

If you need the rule to only execute once, you could add an issue property in the first execution, which will stop the rule activating again the second time around.

Rule will look something like this:

  • Trigger: Issue Assigned
  • Condition: Issue Fields Condition
    • Field = Issue Type
    • Condition = equals
    • Value = Sub-task
  • Condition: Issue Fields Condition
    • Field = Assignee
    • Condition = is not empty
  • Branch: Related Issues
    • Type = Parent
      • Branch-Condition: Issue Fields Condition
        • Field = Status
        • Condition = does not equal
        • Value = In Progress
      • ***Branch-Condition: Advanced Compare Condition
        • First Value = {{issue.properties.subtaskassign}}
        • Condition = equals
        • Second Value = <leave empty>
      • Branch-Action: Transition Issue
        • Destination Status = In Progress
      • ***Branch-Action: Set entity property
        • Entity Type = Issue
        • Property Key = subtaskassign
        • Property Value = true

---

The Condition/Action with *** next to them are the differences here - these two items...

  • Check if an issue property called subtaskassign is populated
  • If not, it creates it

This will mean the rule runs only once - the first time it is executed.

---

Let us know if this works for you!

Ste

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events