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

How to build automation to Sum a Field from linked EPICs into a Idea Custom Field (Numbers)?

Shaun Jeavons
Contributor
April 29, 2024

Hi everyone!

I'm looking to sum the number values from an Epic Field held in each linked Epic (Story Point Estimate) into my Idea's Custom Field (inventively called Linked Epic Story Point Total).

Does anyone know how to build an Automation Rule to achieve this?

I already have Automation Rules built into regular JIRA Cloud that achieve this e.g.

For Stories I join the Fields of Subtasks and the parent Story to sum the Story points:

{
"fields": {
"Story point estimate": {{#=}}{{subtasks.Story point estimate.join(" + ")}}{{/}}

}
}

For Epics I use a different method i.e. first I lookup Issues e.g.

Lookup Issues: parent = "{{triggerIssue.parent.key}}"

Then for Parent I sum the total:

{
"fields": {
"Story point estimate": {{lookupIssues.Story point estimate.sum}}
}
}

But despite tinkering with similar methods to link an 'Ideas' to its linked Epic, I can't make it 'read into these linked Epics' and then sum the "Story Point Estimate" values into that Idea's "Linked Epic Story Point Total" Field.

Has anyone else tried and succeeded with similar?

 

2 answers

2 votes
Bill Sheboy
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 29, 2024

Hi @Shaun Jeavons 

The approach to sum a field from Epics linked to an Idea is similar to your one to sum the values from the children of Epics to their parent.  The differences include:

  • Ideas link to their "delivery items" with a different link than the parent / child relationship.  Try experimenting with issue searches in JQL to find the correct search expression needed for a lookup issues action.
  • The rule will need to be global or multiple-project in scope to access issues outside of the JPD project.  Please work with your Jira site admin to create such a rule as it will be defined in the global settings area for your Jira site.
  • When and how frequently do you want the updates made?
    • For project scope rules like this, they are typically triggered on a change to a "child" issue for the rollup.  If that is needed, a similar trigger could be used.
    • If less frequent updates are needed, a scheduled trigger rule could be used with JQL to iterate over the ideas
    • How many ideas and linked epics are involved?  This is relevant as there are usage limits for automation rules; depending upon your license level, products, and user counts, such a rule on a large site could run often and use more capacity than anticipated.  Again, please discuss this scenario with your Jira site admin to learn their thoughts.

Kind regards,
Bill

Curt Holley
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 29, 2024

I agree with @Bill Sheboy and can add that the linking between an Idea in JPD and an issue in Jira software is the ïmplements' link type.
there are a number of them added/in use for JPD functionality, all easy to recognise (in the back-end/admin section) due to them all beginning with Polaris.


view Issue Link Types.png

Like # people like this
Shaun Jeavons
Contributor
May 1, 2024

Thank you @Bill Sheboy ,

Sadly there is no admin / JIRA expert here - mainly me kicking the tires!

Currently the Automation Rule can look across both projects (i.e. the JPD project and JIRA project) and as per above I have solved rollup for subtasks rolling up to Issues and Issues rolling up to Epics within JIRA.

Do we know (seeing @Curt Holley s comments below) if I need to have some polaris link type expression to roll up between JPD Idea and linked Epics? 

Doesn't seem to use Epic Link between an Issue and a Idea.

Is this kind of rolling up of integer automation between JPD Ideas and JIRA Epics something you have been successful with?

Shaun Jeavons
Contributor
May 1, 2024

Incidentally @Bill Sheboy  there appears to be a distinct link between JPD ideas and 'Delivery progress' links (implements / implemented by as per @Curt Holley ) vs. 'linked issues' (typical link types e.g. relates to).

It's the Delivery progress links I'm trying to join / roll up to which makes me believe that a regular parent/child relationship or 'linked issue' relationship doesn't exist between a RDP Idea and a JIRA issue.

Currently pretty clueless how to get eyes on what the correct advanced field expression should be!

Thank you again for your consideration 

Bill Sheboy
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.
May 1, 2024

As Curt showed, please try the "implements" link type.  For example, the JQL could be this, substituting in your project:

project = yourNonJPDProject AND issueType = Epic AND issueLinkType = "implements"

Shaun Jeavons
Contributor
May 21, 2024

Thank you @Bill Sheboy  from that I can lookup Issues but the challenge now appears to be shifted to the Custom Field not being recognised / discarded.

 

Not certain will ever solve this. Thank you again for your guidance.

 

2024-05-21 13_04_41-Audit log - Automation.png

Shaun Jeavons
Contributor
May 21, 2024

With correct lookup

 

Fieldtype is integer and it's rolling up from Story Points Estimate Field (also an integer) 

 

2024-05-21 13_10_35-Audit log - Automation.png

Bill Sheboy
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.
May 21, 2024

Are you trying to update a custom field named "Story Point Estimate RMP" or the built-in field for team-managed projects, "Story point estimate"?

Please post an image of your current, complete rule for context to go along with that audit log image?  Also please include an image of the Edit Issue action.

0 votes
Bill Sheboy
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.
May 21, 2024

Moving post, as I added it in the wrong thread :^)

Shaun Jeavons
Contributor
May 21, 2024

:)

Thank you again Bill

I am adding the 'Story Point Estimate RMP' field to the 'Idea' in Jira Discovery (RGMP) and am trying to roll-up scores from linked Issues and/or Epics that are linked via 'Is implemented by' from a Team-Managed Project (RG).

Generally I would prefer to link Epics to an idea.

The goal is to estimate the Epic in the RG Team-Managed Project by populating the standard 'Story point estimate' Field and have these estimates for all Epics roll up to the Idea ('implements').

Please forgive any light obfuscation!

2024-05-21 17_37_23-Audit log.png

Shaun Jeavons
Contributor
May 21, 2024

Here's an example of an Automation that already works within the RG Project (only) that rolls up 'Story point estimate' values from the Issues, Bugs and Tasks to Parent Epics.

 

Have tried similar with RGMP Ideas but the parent child relationship doesn't seem to fit the Ideas <> linked Epics relationship

 

2024-05-21 17_49_02-Rule builder - Automation - Jira.png

Bill Sheboy
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.
May 21, 2024

Thanks for that information, Shaun! 

Your rule needs a few adjustments; the tricky parts of a rule like this are it is multiple-project and the links are directional.  Here is an outline I believe will work:

  • the rule is multiple project in scope, declared at the global admin level
  • trigger: field value changes for Story point estimate
  • condition: issue type does not equal Idea (There is apparently a built-in Story point estimate field in JPD projects, as they build on TMP, so let's constrain the rule to not process those.)
  • lookup issues: to find the JPD idea linked to the trigger issue with this JQL
    • issue IN linkedIssues( {{triggerIssue.key}}, "implements" )
  • smart value condition: let's check that only one Idea was found
    • first value: {{lookupIssues.size|0}}
    • condition: equals
    • second value: 1
  • lookup issues: now let's use that JPD idea to find the delivery issues implementing it with this JQL.  I am assuming only one project's issues implement the Idea.
    • project = {{triggerIssue.project.key}} AND issue IN linkedIssues( {{lookupIssues.first.key}}, "is implemented by" )
  • smart value condition: let's check some were found
    • first value: {{lookupIssues.size|0}}
    • condition: greater than
    • second value: 0
  • branch: linked issues of type "implements" to get the JPD idea (You could also save the key from the first Lookup Issues action and use a JQL branch.)
    • action: edit issue, using advanced edit with JSON to save the sum
      • {{lookupIssues.Story point estimate.sum|0}}

 

If you compare this to your rule, the missing parts were to first find the Idea and then later to branch to it for updates.  Please give a try and let me know what you find.

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events