Automation - Two Projects, Linked/blocked by, change a field in original story

TJay.Gerber April 16, 2024

In Project ABC, there is a manual automation where people can run it and it'll create a story in Project XYZ which blocks the story in Project ABC. People can run it multiple times so there might be 3 stories in Project XYZ that block the 1 story in Project ABC.

 

I'd like an automation where, once all the stories in Project XYZ that are blocking the story in ABC are 'done', then it changes a field (Testing Status) to "UAT Complete" in the original ABC story. 

Below is what I tried but when testing in jira sandbox, doesn't seem to be working

Screenshot 2024-04-16 155038.png

3 answers

1 vote
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.
April 16, 2024

Hi @TJay.Gerber 

Done as in in that Status (based on your screenshot)?

I'd set the rule up like this...

  • Trigger: Issue transitioned
    • To Status = Done
  • Condition: Issue fields condition
    • Field = Project
    • Condition = equals
    • Value = XYZ
  • Condition: Issue fields condition
    • Field = Issue Type
    • Condition = equals
    • Value = Story
  • Condition: Related issues condition
    • Related issues = Linked issues
    • Link type = blocks
    • Condition = Some match specified JQL
    • Matching JQL - project = ABC
  • Branch: Related issues
    • Type = Linked issues
    • Link types = is blocked by
      • Branch-Condition: Related issues condition
        • Related issues = Linked issues
        • Link type = is blocked by
        • Condition = Some match specified JQL
        • Matching JQL - project = XYZ and status = Done
      • Branch-Action: Edit issue
        • Field = Test Status
          • Value = UAT Complete

---

This rule...

  • Triggers when an issue in XYZ is transitioned to Done
  • Checks that it's a Story in Project XYZ
  • Ensures there's at least one linked issue in ABC blocked by this Story
  • Once this is confirmed, the Branch locates that linked issue
  • Then it confirms all linked issues in XYZ are Done
  • If yes, it edits the field

---

Let us know if this works for you!

Ste

Kalyan Sattaluri
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.
April 16, 2024

This was a really nice solution. Never knew these options within branch and related issues "some match JQL" option.. :p  Bookmarked!

Like Ste Wright likes this
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.
April 16, 2024

Awesome! Hopefully its useful in the future :)

Ste

Like Kalyan Sattaluri likes this
TJay.Gerber April 17, 2024

Thanks, @Stephen Wright _Elabor8_ looks like another great solution and thank you! Below is a screenshot of what I set up in our sandbox but it didn't seem to work. Audit log just shows "No actions performed"Screenshot 2024-04-17 160411.png

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.
April 19, 2024

Hi @TJay.Gerber 

If you expand the "No Action Performed" message, where does it state the rule was stopped? Likely it'll be one of the conditions.

Ste

0 votes
Kalyan Sattaluri
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.
April 16, 2024

Hello @TJay.Gerber 

To clarify, once all 3 stories in Project XYZ are Done, you want to update the story in Project ABC?

If so, your rule should exist in Project XYZ but scope should also have Project ABC.

  • Trigger = Issue Transitioned and choose Done status.
  • Action = lookupIssues => JQL =  issue in linkedIssues({{key}}, "blocks") 
  • If Condition => smart values =>
    • {{lookupIssues.size}}
    • equals
    • 1
  • Action = Create variable => give variable a name (mykey) and assign it {{lookupIssues.key}}
  • Action = lookupIssues => JQL = issue in linkedIssues({{mykey}}, "is blocked by") and status != Done
  • If Condition => smart values =>
    • {{lookupIssues.size}} 
    • equals
    • 0
  • Branch For Linked Issues
  • Edit Issue => UAT complete.

Please implement and share screenshots of rule and audit log.

 

Explanation:

  • We monitor if story is marked done in Project XYZ. If so, we check if that story was blocking any story in Project ABC. If so, we get the issue key.
  • Once we have the key from project ABC, we lookup all stories blocking it and if they are done or not.
  • If all are done, we edit the issue in ABC by branching over it.

Assumption / Limitation:

A story in XYZ will be blocking only 1 story at a time, if more than 1 story could be blocked, we need to modify the logic. So clarify what a real world scenario will be for this use case.

 

 

Kalyan Sattaluri
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.
April 16, 2024

BTW, you have to set up the scenario by creating an issue in Project ABC, and 3 issues in Project XYZ which are blocking it and triggering the rule by marking the 3 stories as done. 

Of course, the first 2 stories being marked done will trigger the rule but wont go past the second if condition, which is expected, but the third story once marked done should trigger the rule and also update the parent.

TJay.Gerber April 17, 2024

Thanks so much @Kalyan Sattaluri looks like a wonderful flow! Below are 2 screenshots as it didn't seem to work for me, but the audit log did flag an error, so it'd make sense. Seems I have a parenthesis incorrect somewhereScreenshot 2024-04-17 155930.pngScreenshot 2024-04-17 155749.png

0 votes
TJay.Gerber April 16, 2024

@Gikku you helped me on my previous question and this is a similar one, if you're interested in taking a look I'd appreciate it!!

Suggest an answer

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

Atlassian Community Events