How to have field's value calculated automatically based on other fields??

I need to create a field that will not allow a user to enter any value (optional) and will calculated value based on two other fields....basically it will add two fields and display that value (required). Is this possible?

I couldn't find any type of field similar to a 'Calculated Field' so I'm not sure if this can be achieved. The two fields whose values are added are both numeber fields.

Thanks for any help!

5 answers

1 accepted

Hi Tudor,

Yes, you are right. Is not possible in AOD per AOD policy. I remeber before, we used to hack the fields description by using JavaScript (is not preferred by Atlassian) in those cases, but that was my way to get things done.

Now we are no more allowing HTML markup in the fields descriptions, as a result of that, you can't do anyhting as a workaround by using JS.

However, you may raise a feature request at out issue tracker: https://jira.atlassian.com/secure/Dashboard.jspa and feel free to vote/watch.

Hope it helps.

Cheers,

Omar

Any idea if I can create a JQL query with a calculation in it? That way I can just create a report based on the query and report on that calculation rather than show it on an issue?

I guess is not possible, because JQL capabilities is not until that level yet (don't be confused with SQL), may I know what kind of reports your are intending to produce?

Thanks! Basically we are looking for a report which would show money is spend in our development team. Basically a breakdown of how much customers, sales, and our company had to spend to for each enhancement, bug fix or code refactor.

I have custom fields for the $ amounts in each issue, so I was thinking, maybe with JQL I can pick up those fields and report on them. Is that possible?

Would using Confluence as depicted here (https://confluence.atlassian.com/display/DISC/Confluence+Reporting+HOWTO) for these sorts of reports since its SQL based not JQL based?f

If the calculated field is not needed instantly after changing the base field, you might consider implementing a third party application that updates the calculated fields periodically using the Soap or REST interface. The application might use JQL to search for all issues where the calculated field is empty and maybe you can refine the search even more, e.g. AND project = XYZ

Actually after watching some videos on reporting, I'm thinking maybe its possible to create a JQL filter and do the calculation there, where it would be displayed in a report or something. Not sure if this is an option but I will give it a try today.

Hi Tudor

On standalone JIRA version I would write a simple plugin with one calculated customfield (without edit mode, just readonly) to agregate values from other customfields on the same issue.

Cheers,

I actually came across writing a plugin for calculations but I don't think it works with the OnDemand version? Can anyone confirm this?

I didn't see anything in the documentation but I couldn't find any options in the setting to add custom plugins etc...

Since we are using OnDemand JIRA and as per the plugin policy (https://confluence.atlassian.com/display/AOD/Atlassian+OnDemand+Plugin+Policy) I guess I cannot do what is mentioned above and create a pluging for the calculation.

Are there any other options? Or a feature request?

The only way with OnDemand which was mentioned already is to extract the data using the REST API and generating your own report.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 18, 2018 in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

22,486 views 2 7
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