Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,460,395
Community Members
 
Community Events
176
Community Groups

Is it possible to change the colour of a jira ticket based on its due date

Hi

I'm new to this, but using Jira Cloud, We have at any time 30-40 active tickets on a queries based board.

 

I would like to have cards change colour based on how many days they are from their due date, so:

3 more more days away from due date = Green

2 days from due date = yellow

1 days from due date orange

on the date or overdue = red

 

Whats the best way of doing this and the 'code/query'

many thanks in advance

 

3 answers

@Gerry Bolger After you add your quires you have to rearrange the cards for all to show (ex: move the first quire below the second or vise versa and you should see all colors

It did not work for me, but i realised that syntax is:

statusCategory != done and duedate <= startofday("+3") without the 'd' after the number 3

it works now for me at least

0 votes
Jack Brickey Community Leader Dec 14, 2020

you could set the card color on a kanban/scrum board but that is the limit. You will find this under Board settings > card color. it presents a edge band color only.

Jack that's fine, but is it possible it can change automatically, and what would the query be?

Jack Brickey Community Leader Dec 14, 2020

as an example 

use color by queries...

statusCategory != done and duedate <= startofday("+3d")

I threw in the statusCategory assuming you don't care about Done issues. Might use gray/black for done issues

Hi Thanks

I've applied that but whichever way I do it I cannot get the tickets due tomorrow as orange. In fact everything is green Screenshot 2020-12-14 at 18.56.18.png

Jack Brickey Community Leader Dec 14, 2020

your logic here is wrong for orange and red at least if I understand what you want.

first "startofday()" is midnight of the current day not say 8am, just an fyi.

second you are using "-" in your queries which is looking back not foward. so <= startofday("-2d"), considering today is Monday 12/14 means if the issue was due <= Friday at 11:59:59pm or earlier.

Maybe this is what you want below? You may need to play w/ the boundaries a bit.

  • on the date or overdue = red == statusCategory != done and duedate < startofday(+1d)
  • 1 days from due date = orange == statusCategory != done and duedate >= startofday("+1d") and duedate < startofday("+2d") 
  • 2 days from due date = yellow == statusCategory != done and duedate >= startofday("+2d") and duedate < startofday("+3d") 
  • 3 more more days away from due date = Green == statusCategory != done and duedate >= startofday("+3d")
Like Ding likes this

Thanks, I've tried, but nothing happen :-(

Jack Brickey Community Leader Dec 14, 2020

What do you mean "nothing happen"?

I'm confident it will all work. just got to get the JQL nailed to meet exact needs. set up some test issue on the boundaries and see if you can nail it down.

Hi @Gerry Bolger 

Please note the card color that Jira boards use is a thin strip of color on the left of the card.  The entire card is not changed to that color.  Did you note that in the suggestion that Jack offered?

Best regards,

Bill

Like Jack Brickey likes this

Bill, yes totally realise, and appreciate the input both you & Jack are giving.

 

I have used Jac's query but nothing happens, in fact, I loose what colour bands I had with the -2 query; I've modifed the original query with +2 etc, and no difference.

 

Not sure why it is not working

Hi,

The card color filters apply in the order listed, so it can be a bit of a logic issue when they overlap (not mutually exclusive).  The technique Jack listed should make them independent, but your own filters may not be so.

Please try to implement just one card color filter, removing the others, and confirm it works as expected, adjusting as needed.

Then add one more *below* it, and see what happens.  You should be able to make progress from there.

If the single query does not work, please post what you are using to help the community comment.

Thanks,

Bill

Syntax in jql for color change for specific field 

See the JQL in the previous answers.  You can base it on pretty much anything you want. 

Remember that JQL simply finds matching issues, and each rule for a colour is simply "does this issue match the search?".  The colouring is done by the display, not the JQL.

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events