It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Scriptrunner number field with custom formatting


I have script custom field, with searcher "Number searcher" (for ordering tasks)


Is it possible to change color of issue value?

When i try 

String d = "<font color='blue'>" + SumPoint + "</font>"

I have error, that d is not Double.

1 answer

1 accepted

0 votes
Answer accepted
Peter-Dave_Sheehan Fancyface McSparklypants Mar 04, 2020

The output of your scripted field should match the data type expected by the searcher so that it can be indexed properly.

If you want to have a different visual, then you can set a custom template:

<font color='red'>$value</font>

But i can't change it depending on my value, right?

Like if (vaule<5){

font color='red'>$value</font>

}esle if (value>5){

font color='green'>$value</font>


Peter-Dave_Sheehan Fancyface McSparklypants Mar 05, 2020

This uses velocity template and I'm not super well versed in it ... but try this:

#if ( $value < 5 )
<font color='red'>$value</font>
#elseif ( $value > 5 )
<font color='green'>$value</font>
Like Alekseii_Okhmush likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira Service Desk

ANNOUNCING: Early access ITSM features in Jira Service Desk

Meet the new and improved IT service management template for Jira Service Desk! Here are a few of the powerful features ready and waiting for you: Better focus on ITSM - clear ticket categories...

230 views 3 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you