How to Use JQl to color cards

Stephen Fell September 13, 2017

Hey Everyone, 

I'm new to Jira and im trying to get the most out of the tool and wanted to use the "card colours" feature so i can colour cards in the activity sprint view to change colour based on a field called "due date" however having never used JQL and being new to Jira im unsure where to start, essentially im trying to achieve the following:

  • Colour = RED when the the due date of the card is today or within 3 days 
  • Colour = Amber when the due date of the card is within 5 days of today
  • Colour = Green when the due date of the card is 6 or more days  from today

Any help you can offer to help me achieve the above outcome would be much appreciated. 


Thanks 

 

4 answers

1 accepted

4 votes
Answer accepted
Warren
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 13, 2017

You will need to have project Admin rights to do this.

Go to Board settings and click on Card colours. From the dropdown select Queries, then add your JQL for each different colour. N.B. the order is important because it will use the first colour where the condition matches, so drag the items to reorder.

Stephen Fell September 13, 2017

Thanks for the reply. 

Ive got that far the bit I'm struggling with is what JQL code I need to use to make it happen 

Warren
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 13, 2017

Ah, let's try and get that sorted then.

Colour = RED. The JQL is  duedate <= 3d

Colour = Amber. The JQL is duedate <= 5d

Colour = Green. The JQL is duedate <= 6d

I think I'm right in saying that they need to be done in this order, but play around with it and see

Like # people like this
Daniel
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 25, 2021

It seems they are evaluated from top to bottom, with the first match deciding the colour

Like Anoop VK likes this
2 votes
Lourdes Valladares
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 30, 2021

Hi there!

It happened to me that colours were being overwritten because the biggest condition applied to everything, I added a "between" range to fix it:

Colour = RED: The JQL is  duedate <= 3d

Colour = Amber: The JQL is duedate <= 5d AND duedate >= 3d

Colour = Green: The JQL is duedate <= 6d AND duedate >= 5d

 

I hope this helps someone with my same issue.

drazorenov January 19, 2023

in last two options better use '>' indeed '>='

Frank Collazo
Contributor
April 1, 2024

So the syntax would be objectType = ASSET NAME AND color=RED AND duedate >=-30d between duedate <=30d?

0 votes
Francisco Soto
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 9, 2023

With the new UI I can't find the option under Board settings > Card colours.

Any suggestions?

Marc - Devoteam
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.
March 7, 2024

Hi @Francisco Soto 

This can only be done on boards in company managed projects.

This is not an option in team managed projects

0 votes
Stephen Fell September 15, 2017

Super thanks for the help, that id the trick :) 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events