4

We're using the following rule to mark work items that delay 2 days or more:

Changed Date   <=  @Today - 2
Work Item Type =   Task
State          =   In Progress

(Then, color the task in red)

The problem is that when a task gets started on Friday, on Monday it will be red, even though only one working day has passed.

Is there a way around this?

Tar
  • 8,529
  • 9
  • 56
  • 127
  • Hi Tar, just checking to see if the information provided was helpful. As my and jessehouwing's comment stated, it's not available in TFS for now. Sorry for any inconvenience. – PatrickLu-MSFT Sep 19 '19 at 03:19

1 Answers1

4

This is not available to do this. For Changed Date field:

Change Date

The date and time when a work item was modified.
Reference name=System.ChangedDate, Data type=DateTime. 

Since using data time type, it's not able to auto exclude weekends, this is by designed for now. State Change DateThe date and time when the value of the State field changed.

DateTime

= , <> , > , < , >= , <= , =[Field], <>[Field], >[Field], <[Field], >=[Field], <=[Field], In, Not In, Was Ever Macros: @StartOfDay, @StartOfWeek, @StartOfMonth, @StartOfYear, and @Today; each of these macros can be specified with a +/- n interger.

There has also been a related feature request:

Add option to exclude weekends when setting up Styling rules using the 'Changed Date' field rule criteria

https://developercommunity.visualstudio.com/idea/376310/add-option-to-exclude-weekends-when-setting-up-a-s.html

You could vote up it and our PM will kindly review it. Unfortunately, we do not have any perfect solution/workaround, you may have to manually change/update the colored task based on those tasks which get started on Friday.

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
  • 1
    Plus, workingdays are team+sprint specific. Since sprints can overlap, that's even harder and queries may span items outside of the team's backlog and sprint scope. – jessehouwing Sep 16 '19 at 09:47
  • I was fearing, while guessing, that that would be the answer. With JIRA it's very simple - with a check of a checkbox you can have the number of *work* days, that the task is in progress, shown on the task. Bummer – Tar Sep 19 '19 at 04:31