How do you create a calculated custom field?

Alyssia Byers April 30, 2012

I am trying to set up a calculated custom field in JIRA. Is this possile?

2 answers

2 votes
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.
April 30, 2012
please check if the "velocity processed message custom field" is available for you when you create a custom field. This allows you to render a velocity template specified in the custom field default value whereever the custom field is displayed or edited. (screens and issue navigator)

this custom field is provided by the Jira Toolkit Plugin which is installed on OnDemand but i'm not sure if it's also enabled on OnDemand.

Nic Brough -Adaptavist-
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 30, 2012

The velocity field option is powerful, but doesn't enable searching or sort in the navigator (the calculation is done on display, the results are not indexed or stored on the issue). So you need to think about what you're looking for before reaching for a particular solution. (Caveat - I don't know what's available in OnDemand, it may be that you can't do anything more than this. Yet)

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.
April 30, 2012

agree with you, Nic. It's potentially dangerous so i'm still doubt if Atlassian enabled it. Hopefully what Renjith suggested will be available soon

2 votes
Jo-Anne MacLeod
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 30, 2012

The script runner plugin will allow you to configure that. I used it to take two fields, and concatitate them together, which dashes and made a third field. The field type was 'scripted'.

Alyssia Byers April 30, 2012

We have JIRA on demand so I don't believe I can add any plugins?

JamieA
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 30, 2012

No, you cannot. I think Jo-Anne is referring to the script runner plugin which has a "scripted field" type, where you can define the calculation in a line or two of groovy. It can also be done with the behaviours plugin though, although the former is the better option.

Jo-Anne MacLeod
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 30, 2012

D'oh...you're right Jamie, it it script runner. I've updated my original answer to point to the correct plugin now.

See I should never answer anything when I've only had one cup of coffee.

Suggest an answer

Log in or Sign up to answer