JIRA Color Custom Fields accept HTML commands in field description for automatic setting?

Hello,

I am wondering if it is possible for the Color Custom Fields, particularly the Picker, to accept and act upon setting rules / commands via HTML stored in the field description?

In particular, I would be interested in running the following or a similar command:

<!-- @@Formula: issue.get("customfield_11605")>=1 ? #00ff00 : issue.get("customfield_11605") >=0.7 ? #ffff00 : #ff0000 -->

Basically I would be looking for the ability to conditionaly set / format these fields automatically?

Would this be possible, now or in the future?

4 answers

1 accepted

Jordan,

If you want to see change color on screen you need to use javascript in description.

Otherwise you can write post function using script runner to change value

Hello,

I am creator of this add-on. You mean to set value using javascript in description of banner?

If so my answer yes, because, it is just test field with specific renderer. Or you are asking to do it using configuration?

Hello sir,

Yes, I think that placing the command in the Description would be fine.

I am not at all particular as to the language used - just whatever would cause the field value to be automatically set the easiest?

OK, thank you for the advice........

I am trying out the syntax - can you help me out wit hthis syntax to be placed in the Description?:

<!-- @@Formula: if (issue.get(“customfield_11605”)>=1)
{
return #00ff00;
}
else if (issue.get(“customfield_11605”)>=0.7)
{
return #ffff00;
}
else
{
return #ff0000;
} -->

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

180 views 0 4
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you