Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Script Field with Custom Template depending on $value

RMA September 29, 2020

Hi,

I try to create a custom script field with a custom template which set the color of the field depending on the output value. In my case the value should be green if $value < 10 and yellow if $value > 10 < 20 and red if $value > 20. Is it possible to enter a code like this? What is the best solution for this Problem? 

if $value < 10

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

 

Best Regards

Robert

1 answer

0 votes
Bert Dombrecht
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.
September 29, 2020

Hi RMA, this question has an accepted answer here: https://community.atlassian.com/t5/Adaptavist-questions/Scriptrunner-number-field-with-custom-formatting/qaq-p/1312409

Perhaps the crux is in the output data type.

Hope this helps.

RMA October 1, 2020

Hi Bert, thanks. This has helped me!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.4.2
TAGS
AUG Leaders

Atlassian Community Events