Report values calculated based on field values?

Tudor Hofnar October 22, 2012

Not really sure how to word this question...or if I can do this in JIRA.

For all our issues we have fields such as $Total (total money spent) $Customer (money invested by the customer) $Sales (discount the sales guys gave the customer).

Now we need to create a report that will display all these values on a bar chart or something similar but we also have a formula that we need calcuated to see if we are in the + or -.

Basically the formula is $Final = $Total - ($Customer + $Sales)

Is there any way we can generate values based on this formula for each issue and display them in a chart/report in JIRA???

Thanks for any help or ideas! I looked through the reports and it didn't really seem like any of the built in reports can do this?

----------------EDIT:

After some searching I found out that you can export all issues to Excel and then create a formula there that would be able to do this calculation but is this the best way?

If this is the only way is there somehow to create an automatic download of all issues say at the end of each day? I don't really want to have to physically download all issues whenever I need to update the report and then paste the raw data into my report. Is there an automated way to do this? Automatically refresh the data in a spreadsheet?

3 answers

1 accepted

0 votes
Answer accepted
Lee Correll
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 30, 2012

I'm not sure about your item above - but we have all sorts of scripts which manipulate the JIRA data due to OnDemand / Atlassian limitations. All of them utilize either cURL or Bob Swift's CLI to fire RESTful API calls -

with them, I produce a daily summary of a large number of stats that I use to manage my team. For example, looking forward an interation, I can tell you how much of our available work is billable, how much is in the queue to move our product forward, potential bug fixes, strange things the sales folks want, etc. See below for an excerpt of a recent one.

12 Engineer requested issues
5 Approved for Engineering
256 valid issues for next iteration, estimated at 905.5 hours (not including carryover)

<th width="100">Issue Type</th><th width="100">Issue Count</th><th width="100">Total Hours</th>
Billable <center>44</center> <center>204.5</center>
Product Dev <center>120</center> <center>793.25</center>
Sales <center>8</center> <center>42</center>
Support <center>87</center> <center>295.25</center>

JQL is a query tool, not a reporting tool - that's part of the drawback in using straight JQL for items of this type.

1 vote
Logan G Hawkes
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.
December 12, 2012

I think the GroovyRunner plugin is the answer. GroovyRunner will allow you to create a scripted field that executes a chunk of code behind the scenes and displays the result. There are a bunch of code samples that can easily be modified for your specific needs. In your case, I think Calculate a number based on other fields will do the trick.

0 votes
Tudor Hofnar October 23, 2012

anyone??

Is there a way I can just create a custom field for each issue which will have a calculated value in it? I noticed the ability to create calculated fields as a plugin but the guides I found don't really detail every starting step and I have no idea where to write the code....is this even good for OnDemand versions of JIRA?

Would something like this work with OnDemand JIRA: https://developer.atlassian.com/display/JIRADEV/Plugin+Tutorial+-+Creating+a+JIRA+Report

Suggest an answer

Log in or Sign up to answer