Stylize Azure DevOps Taskboard Cards
Introduction
When working in a software project adhering to Agile methodologies, there can be many stories and tasks being worked on simultanously, in various states, across the team. Maybe a few active, maybe some waiting for Pull Request reviews, etc. Sometimes it’s easy to lose track of tasks that have been in progress for a while. Here’s a way to draw attention to these tasks through the use of automated color-coding rules.
The Taskboard
Azure DevOps, like GitHub and other similar tools, provides various ways to manage a project’s work items, such as user stories, tasks, and bugs. Azure DevOps provides Boards to view these work items, with each work item represented as a Card. For example, here is a sample Board with two User Story work items, one in New state, one in Active state, and both tagged as a post
:
Depending on the Board template chosen, the various columns may be organized differently. You’re free to customize Boards further, to include or exclude specific work item types for your project.
Card styles
Every Card on the Board can have its own color and font style, and you can create rules to set these styles based on several properties such as assigned tags, the state of an item (e.g. new or active), item type (such as user story or task), and most recent date of change.
Our sample Board has two blog-post work items, each with a post
tag applied. Let’s say we want to style all blog-post work items with a pale-green background color. To set up a rule for this, start by selecting the Settings icon (the gear in the upper-right corner of the Board):
This action opens the Settings page. From here, choose the Styles tab, and add a new Styling rule:
Give your new rule a name, choose a color, and define the rule’s criteria:
Field | Operator | Value |
---|---|---|
Tags | Contains | post |
Your new rule should look something like this:
Once you save this rule, it will automatically be activated, and all Cards tagged as post
should now have its background color match the color that you chose in your rule. In my sample Board, both posts are now light green:
Adding a time-based style rule
Here’s a slightly more advanced rule that sets a work item’s style to yellow for any user story that’s been active for more than a day without being updated (such as being moved to a new state, or having its contents edited). We won’t worry about any particular tags in this rule, as we’re just trying to identify items that have been active for a while without any updates.
As before, create a new rule from the Style tab of the Board settings. This time, select yellow for the color style, and set the following criteria:
Field | Operator | Value |
---|---|---|
State | = | Active |
Work Item Type | = | User Story |
Changed Date | < | @Today-1 |
Note: If your Board contains Tasks instead of User Stories, you can change the Work Item Type accordingly.
With this rule saved and activated, any User Story Card on the Board that hasn’t been updated in over 1 day will be highlighted in yellow:
The moment a work item is updated, the yellow color style would no longer apply, since its Changed Date is no longer more than a day old. For example, as soon as I move my active User Story to the Resolved column, the yellow-style rule no longer applies:
Wrap-up and further reading
I find a lot of value in color-coding Cards on Azure DevOp’s project Boards, as it helps me quickly identify specific item types, as well as long-running tasks I need to pay attention to. The two rules I showed in this post are in use across many projects within my organization.
There are many other rule options available. Check out this article for a more detailed look at Card customization. For a deeper exploration of date-based rules, take a look at this article.
For an overview of Azure DevOps, this article is a great place to start. From here, you’ll also find documentation about Azure Boards.
Lastly, check out this article for more information about the different process templates provided by Azure DevOps.