Automation - Edit the Epic field when one of child issue was deleted

nessie.liu March 19, 2024

Hi,

I encountered a problem when I want to sum up the story point of epic based on the child issues, I create 3 Automations to cover all the scenarios, they are: 

1. When story points of story/task/bug change, find the parent epic and look up the tickets below and calculation the story points

2. When a new story/task/bug link to this epic, find the parent epic and look up the tickets below and calculation the story points

3. When a story/task/bug delete the parent link, and there's no relationship between this epic and story/task/bug, I need to re-calculate the story point of this epic to minus the value

 

The problem is about scenario#3, if the parent link of story get deleted, how can I find the parent and edit the field? Do you think I should create a scheduled job to execute all epics and calculate the story points based on child issues?

3 answers

1 accepted

1 vote
Answer accepted
Fernando Eugênio da Silva
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 19, 2024

@nessie.liu 

You can use an automation like this:

 

Trigger: Field value changed

  • Field: Parent
  • Change Type: Value deleted
  • For: Edit Issue

Action: Create variable

  • In my case I called the variable as lastparent
  • For Smart Value insert: {{fieldChange.fromString}}

Now you're be able to follow with your automation rule looking for the issues inside the 'Epic' (parent) of your issue. Just use the variable "{{lastparent}}" in your lookup or other action in your rule.

You can add some conditions to limit your rule.

 

Hope this helps you.

nessie.liu March 19, 2024

Thanks for your suggestion! Seems like it works as expected!Untitled picture2.png

0 votes
Lance
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 20, 2024

Your solution has resolved our issue perfectly... Thank you for sharing!

0 votes
YY哥
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 19, 2024

Hi @nessie.liu 

Welcome to our community. Here's a solution to your scenario:

image.png

Create variable

parentEpic = {{fieldChange.fromString}}

Lookup issues

parent = {{parentEpic}}

Send web request

https://{{site name}}.atlassian.net/rest/api/3/issue/{{parentEpic}}

HTTP method:

PUT

Custom data:

{
"fields": {
"customfield_10030": {{lookupIssues.Story Points.sum}}
}
}

 

Headers (optional)
Authorization = xxxx
Hope it helps you.
YY哥

Suggest an answer

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

Atlassian Community Events