change the colour card based on labels

Gabriella Fryett April 16, 2018

I would like to colour the cards on the kanban board based on labels assigned to each ticket. 

label = tracking - where tracking is one of the labels used within Jira. 

 

Currently even though the JQL validates with a green ticket - the colours do not show. 

 

Cheers

5 answers

2 accepted

4 votes
Answer accepted
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 5, 2019

Hi everyone,

There is a documented bug where we are tracking a scenario that can cause card colors to not appear on a board. Please see JSWSERVER-13620 for more details.

Essentially, if you have any invalid JQL queries in the card color section of the board settings, no card colors will appear at all for that board. It could be that the label value was invalid, or one or more of the values was not be referenced correctly in the JQL used. However if the JQL is valid, then that should correct this here.

I hope this helps.
Andy

2 votes
Answer accepted
Bob Moore April 16, 2018

This looks like a bug to me. I encounter the same issue. Are you utilizing the component field at all? This definitely works and could be used in a similar way.

Gabriella Fryett April 16, 2018

We aren't but we could if we can find a way to make it work. 

Bob Moore April 16, 2018

Actually, if you add double quotes around the label field value, your issue will be resolved!

 

E.g labels = "tracking"

Like John-Paul Laflamme likes this
Cecil Dearborne July 30, 2018

Did anyone ever find a solution to this because I'm having this problem as well. 

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 30, 2018

@Cecil Dearborne, what issue are you having exactly? Can you share the JQL that isn’t working for you?

Cecil Dearborne July 31, 2018

@Jack Brickey, I want to have my cards/issues highlighted with a red color if they are blocked. I decided to use the "BLOCKED" label to keep things simple for now. 

Here's a screenshot of what I did but the end result is that the cards are not showing up red. I even went to a specific card, clicked on the "BLOCKED" label which took me to a screen that showed all cards with that label, and then I copied the JQL from that screen and reused it.

 

Screen Shot 2018-07-31 at 8.25.33 AM.png

Like # people like this
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 31, 2018

it is working for me in Cloud (see below). Question, when you begin to type BLOCKED in the JQL do you get the auto-complete box where BLOCKED shows? If so please select the label from there. If you do not see the label then chances are you are not entering it as correctly, remember case-sensitive.

blocked.jpg

Cecil Dearborne July 31, 2018

So odd. I have tried many things:

  • autocomplete for everything including the "=" 
  • BLOCKED with double quotes
  • BLOCKED without double quotes
  • copy of JQL from when I clicked on label

None seems to be working for me. So odd. 

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 31, 2018

so the autocomplete actually presents you with the label you are looking for and you select it? and the JQL search actually present you with the list of issues you want to have the red bar? Are you on cloud or server?

As a side note, i wouldn't recommend using labels for blocked issue but would favor a status. Labels get mistyped and in your case when unblocked you have to remove the label. just an opinion.

Cecil Dearborne July 31, 2018

So in response (in bold) to your feedback and questions: 

  • so the autocomplete actually presents you with the label you are looking for and you select it?  Yes
  • and the JQL search actually present you with the list of issues you want to have the red bar? Yes
  • Are you on cloud or server? Cloud
  • As a side note, i wouldn't recommend using labels for blocked issue but would favor a status. I understand the concern but I want to try out something simple with the team first. If we find it effective we may explore other solutions like leveraging status but that may add it's own levels of complication that I'm trying to avoid.
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 31, 2018

I would recommend reaching out to Atlassian support so they can log into your instance and inspect. 

1 vote
Mithun Narayana November 27, 2018

I was going through similar problem. However, instead of going with "=" format I proceeded using "in", which worked!!

Example: labels in ("Blocked").

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 27, 2018

That certainly works. The “in” operator is used primarily used to shorten a JQL. For example:

labels = “blocked” OR labels = “aaaa” OR labels = “bbbb” is more tedious than labels in (“blocked”, “aaaa”, “bbbb”)

Like # people like this
Stevers August 1, 2022

Experimenting. We did the following:

Color: RED

JQL: labels in (Blocked, BLOCKED, blocked)


Color: LIGHT BLUE 
JQL:    labels in (suseng, chore)

0 votes
Stevers August 1, 2022

Posting here for anyone stumbling upon this thread still looking for an answer.

We did the following:

Color: RED

JQL: labels in (Blocked, BLOCKED, blocked)


Color: LIGHT BLUE 
JQL:    labels in (suseng, chore)


We're probably moving Blocked to a specific State (and column) so we can track the time spent in that state/column.

0 votes
Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 16, 2018

Labels are free ticket thus make sure you type the exact thing in the JQL as it is on the ticket. And other users also type the exact text. Since labels are free text thus I personally don't prefer to make use of them as chances of error are high because even a small typo would break the functionality. 

Suggest an answer

Log in or Sign up to answer