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

Tudor Hofnar October 23, 2012

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

2 votes
Answer accepted
OmarA
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.
October 25, 2012

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

Tudor Hofnar October 25, 2012

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?

OmarA
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.
October 25, 2012

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?

Tudor Hofnar October 25, 2012

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?

Tudor Hofnar October 26, 2012

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

1 vote
Dieter
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.
October 25, 2012
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
Tudor Hofnar October 25, 2012

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.

0 votes
Norman Abramovitz
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.
October 26, 2012

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

0 votes
Tudor Hofnar October 24, 2012

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?

0 votes
Krzysztof Skoropada [Deviniti]
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.
October 24, 2012

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,

Tudor Hofnar October 24, 2012

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...

Suggest an answer

Log in or Sign up to answer