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

Change field color when another field changed

Hello everybody. I have 2 different custom fields in issue (e.g cF1 and cF2) and I need functionality when I change cF1 the cF2 should changed automatically to another value and should be hilighted with some color. 

I suppose I can use Custom Script Field, where in InlineScript field I can write script which returns the value of cF2 to custom template field, where I can change color of field. 


1. what should I do to change cF2? (Write a custom listener script, which changes cF2 when cF1 changed or I can change cF2 in the Custom Script Field or some other ideas)?   

2. how to write template, which changed field background? (please example) 

1 answer

1 accepted

1 vote
Answer accepted

If you create a Scripted Field, it does not hold any value.

It only renders what you have scripted, on the fly.


So if cf2 is outputting a value, based on cf1 value, then if cf1 changes, also the cf2 output will change.

No that tutorial involves javascript, meaning using Jira stock.


You just need to create a scripted field, select it's output format (template) "HTML".

Then you can use groovy to calculate the logic and return a html in string format.



def returnArg
case "Low":
returnArg = "green"
case "High":
returnArg = "red"
default :
return "<h4 style='color:${returnArg}'>Test me</h4>"

Suggest an answer

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

Introducing new features for Jira Software Cloud's roadmap

Hi Atlassian community, A few months ago, we offered a sneak peak of the new hierarchy view on the roadmap. Thank you for all the feedback (and excitement) and for helping us shape the direction of...

22,891 views 101 74
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