JIRA 5.2.11 Display a different format for number custom field not working like described in docs

Christian Czaia _Decadis AG_
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.
June 12, 2013

Hey,

I recently upgraded JIRA which I had customized to display a custom field in different format according to this documentation:

https://confluence.atlassian.com/display/JIRA/How+to+display+a+different+format+for+the+Number+customfield

I changed:

WEB-INF/classes/templates/plugins/fields/view/view-number.vm
under the JIRA web application and replaced:
$!numberTool.format($value)
with:
$value.longValue()

After the upgrade to 5.2.11 every number field shows $value.longValue() instead of the actual number. The update added the disable HTML escaping and TODO REENABLE to the template...

Any ideas?

Cheers

4 answers

1 accepted

2 votes
Answer accepted
David Pinn
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.
June 12, 2013

Try $!value.longValue()

Christian Czaia _Decadis AG_
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.
June 12, 2013

That's resulting in no values being displayed at all...

David Pinn
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.
June 12, 2013

Hmm. That suggests that the 'value' variable is unset or null. Not sure where to take it from here, though.

0 votes
Christian Czaia _Decadis AG_
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.
August 25, 2013

I'm not sure why but all of a sudden it works...

0 votes
RambanamP
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.
August 25, 2013

you may get response from atlassian by updating this issue, but i am not sure!

https://jira.atlassian.com/browse/JRA-7582

0 votes
Christian Czaia _Decadis AG_
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.
August 25, 2013

Any new ideas on that one?

Suggest an answer

Log in or Sign up to answer