• Community
  • Questions
  • Can Automation for JIRA calculate a field on a linked issue using math functions as action?

Can Automation for JIRA calculate a field on a linked issue using math functions as action?

I am currently working on the challenge to implement project controlling in JIRA and was wondering whether a field on an issue called project could automatically be calculated when a value on a linked sub-project issue changes?

I have a hierarchy over four levels using sub-tasks already so changing the link between project and sub-project to a task-sub-task-relationship is not an option.

1 answer

1 accepted

0 vote
Andreas Knecht Community Champion Aug 23, 2017

Hi Nadine, 

I'm not 100% sure I fully understand your exact setup, but with Automation for JIRA, you can action related issues that you find based on JQL. Match functions can be applied to those.


So for example you could have a rule like this:

  • Trigger: Field value changed with your field selected
  • JQL condition: type = sub-task ?  
  • Branch rule with Parent
    • Edit issue action where you set the 'project' field to something like:
      {{#=}}{{triggerIssue.someField}} + 25{{/}}

'triggerIssue' would refer to the issue produced by the trigger in this example. 'someField' is the name of your field.

Not sure if this helps.  Like I said I need more details about your exact case.    Bacially in the branch rule, you could also use JQL to find the related issue somehow.  



Hello Andreas 

Thanks a lot for your prompt reply.

Actually, I'm not sure I fully understand my setup... ;-) but let me try to explain: 

I have a standard issue type project linked to 1-n other standard issue types sub-project via the link has sub-project.  Both issue types have a numeric field called Labour Hours and what I need to achieve is the Labour Hours for issue project being automatically updated as sum of Labours Hours of all linked sub-projects when Labour Hours of one sub-project is updated. 

I have already configured a prototype using tranistion triggers and post-functions for calculations which works fine. But now my customers wants values to be updated not using transitions. We could use Script Runner or a custom add-on to achieve this but I prefer a solution not requring to much scripting which is also maintained as a marketplace add-on. Hence, I would love to use Automation for JIRA.

Andreas Knecht Community Champion Aug 23, 2017

Hi Nadine,

Ah right so you want to calculate the aggregate sum of various linked issues.  We don't support this yet, but we're already tracking this request at https://codebarrel.atlassian.net/browse/AUT-476.

We've got quite a few higher priority items in our backlog at the moment so it will be a while before we can get to this, but we'll let you know when we get a chance to work on this.




We have the same scenario that we'd like to address.

Our hierarchy of issues is made of Epics / Stories / Subtasks.

We'd like to have a "Rolled Up Time Spent" custom field that sums up the time spent on a issue with the total time spent on related issues below when time is logged against either the task itself or its related issues.

e.g. when time is logged on a subtask (or the subtask is edited), "Rolled Up Time Spent" is updated at the parent Issue & the Epic levels (may be a cascade of 2 automations here, due to the 3 levels hierarchy).

I don't seem to be able to login and vote for AUT-476, so I add this comment here to say that I am interested ;-)



We are currently evaluating Automation for JIRA for our needs.  This is a very important feature for us as well, especially now that the JIRA pricing structure has changed significantly.  We will need  to minimize the number of add-ons we purchase.  I'm not sure if there is way to vote up on this but consider this as high priority if you can.


Suggest an answer

Log in or Join to answer
Community showcase
Louis De Jaeger
Posted yesterday in Off-topic

Friday fun: your best joke

Hi all Lets make this Friday fun really fun and post one (or more) of your best jokes! The joke can be about an Atlassian product, or just a really fun joke you want to share! I’m not the best j...

168 views 12 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot