Forums

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

JavaScript help for Traffic Light Rules

Scott Theus
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.
January 31, 2019 edited

I'm using the Traffic Lights for Jira add-on and could use a hand with creating a rule; the rules are JavaScript, and (Darn it Jim!) I'm a Project Manager, not a Software Engineer

In plain words, here is what I want to do:

If the State field  for an Issue is empty or if the Status of an issue is "Backlog" set all three traffic lights to Grey and set the State to "Backlog"

But...

If the State field for an issue is "Done" set all three traffic lights to Blue and set the State to "Complete"

If the State for an issue is something else don't do anything.

 I can get the "Done" clause to work using this:

if (issue.status.name == "Done") {
issue.traficLight("State", "(#003ffc,#003ffc,#003ffc) Complete");
}

But that is about as far as I can get. 

Any ideas?

-Scott

 

1 answer

0 votes
FP February 2, 2019

Please better create a support ticket by emailing at support@traffic-light.polscheit.de to get faster responses.

Suggest an answer

Log in or Sign up to answer