Automation - lookup issues that are Done

Levine February 1, 2023

I'm a JQL newbie and trying to modify an existing automation ("When the story point estimate for an issue is changed → sum up story point estimates in Epic") to update a field with the number of story points completed. 

To do this, I believe I have to update the Lookup issues function (parent={{triggerIssue.parent.key|"null"}}), but I have no idea how to only search for issues with Status = Done. 

I feel like this should be relatively straightforward, I'm just not familiar w/ this particular syntax.  Any thoughts?

1 answer

1 accepted

0 votes
Answer accepted
Walter Buggenhout
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 1, 2023

Hi @Levine and welcome to the Community!

There is something strange about your use case. From what you describe, it seems you want to track the number of story points completed. But that seems something you would do when a story is actually completed, rather than after you update a story point estimate.

If I understand your use case correctly, I would rather automate it like this:

Screenshot 2023-02-02 at 07.30.19.png

In short:

  • WHEN a story transitions to Done
  • Check if it has a parent epic
  • Then, for that Epic lookup all its child issues ("Epic link" = {{issue.key}} AND Status = Done
  • and update a field Story points completed in your epic using {{lookupIssues.Story Points.sum}}

In the example above, I used the Story Points field as an example. That's just because I don't have a specific field set up for points completed in my test instance. Definitely set up a different field for that.

Hope this helps!

Levine February 2, 2023

Thanks for the response, Walter!  I should have clarified that I already had a condition looking for when a ticket was moved to Done.  That said, I think your approach is cleaner, so I experimented w/ that.

 

At this point, the automation runs, but it's still not summing the story points in the target column.  Here's my automation:

 

Screenshot 2023-02-02 at 2.18.22 PM.png

 

And here's the results on the epic:

 

Screenshot 2023-02-02 at 2.20.04 PM.png

 

As you can see, Test 1 is marked as Done, but the Completed Story Points remains 0.  Audit said the automation worked, any ideas what could be the issue?

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 2, 2023

What does the Audit Log show for the execution of the rule? Notice the Audit Log option above the Rule steps, below the rule title and link to the Rule Details page.

Screen Shot 2023-02-02 at 3.42.14 PM.png

 

Can you confirm for us that you are indeed working with issues in a Team Managed project?

I actually was just constructing this same rule in response to another post, and I found that it didn't work if I used Epic Link in the Lookup Issues action. Instead I had to use Parent.

Like Walter Buggenhout likes this
Levine February 3, 2023

Parent did it - thanks for all the help!!!

Like Walter Buggenhout likes this
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 3, 2023

I'm glad we could help you!

If your problem has been solved, please consider marking the Answer thread as Accepted to help other users find posts with working solutions.

Like # people like this

Suggest an answer

Log in or Sign up to answer