27Oct

How to Prevent Users from Moving Task to Closed State with a non-Zero value Remaining Work field in VSTS/TFS

One workflow problem we see in VSTS/TFS projects is people move the Task to Closed or Resolved state without updating the Remaining Work to Zero which leads to some incorrect project reports. In theory, there should be no Remaining work for Closed or Resolved Tasks. One of our customer had this below requirement. Wanted share how we customized the template to make it work as questioned below

Can we perform a check that prevents people from moving the state of a Task to Resolved or Closed with a non-zero Remaining Work?

We can achieve this by customizing the TFS/VSTS work item template in two ways. The 1st option will not allow the user to move the Task from Active to Closed state with a non-zero value in “Remaining work” field whereas 2nd option sets the remaining work to Zero when user moves the Task from Active to Closed state.

  1. Using the ALLOWED VALUES Rule on the Transition to the Closed state.
  2. Using the COPY Rule on the Transition to the Closed state.

 

  1. Using the ALLOWED VALUES Rule on the Transition to the “Closed” State.
  1. Export/Download the process template and open the Task work item template in any text editor.
  2. In the Transition to the “Closed” state add the below rule to the field Microsoft.VSTS.Scheduling.RemainingWork

         RWZ8 

This rule won’t allow the users to move the Task from Active to Closed state with a non-zero Remaining work.

 

Verification:

Task is currently in Active State

RWZ1

When we move this task to Closed State It won’t all non-zero remaining work and it will show “0” as allowed value in the dropdown.

RWZ2

 

So, this way we can perform a check that prevents the users from moving Task to “Closed” state with non-zero Remaining work

   2. Using the COPY Rule on the Transition to the “Closed” state.

          Same requirement can also be achieved by using COPY rule on the transition to “Closed” state. We need to replace the above code snippet with the below code

RWZ9

This rule will set Remaining work to 0 after transitioning a Task work item from “Active” to “Closed” state.
The task is now in Active state.
RWZ3

When user move this Task to Closed State Remaining work is Set to Zero as shown below

RWZ4

We can see the same in work item history.

RWZ5

Related

Roles in DevOps Mobile App Development

DevOps can be defined as an approach to enable seamless application delivery from inception to produ...

Read More >

NAV – Connecting Microsoft Dynamics CRM customized entities

This blog is intended to see how Microsoft Dynamics NAV (here onwards NAV) can be connected to exter...

Read More >

NAV – Connecting External SQL

This blog is intended to see how Microsoft Dynamics NAV (here onwards NAV) can be connected to exter...

Read More >

DevOps with Visual Studio Team Services for Java

Hi All, if you are worrying how to do DevOps for Java in VSTS, here is the solution. I’m going to e...

Read More >

Implementing Security to your DevOps Pipeline

Hi all, today in this post I'm gonna talk about "Implementing Security to your DevOps Pipel...

Read More >

VSTS Rollup Service - How to use

          Hi All, Here i'm going to explain How VST...

Read More >

VSTS Rollup Service - Setup

Hi All, if you are worrying how to calculate sum of the effort fields in VSTS, here is the solution....

Read More >

VSTS Area Uploader

VSTS Area Uploader helps you to upload Areas (with multiple level) to your VSTS Team Projects from a...

Read More >

VSTS Copy Dashboard Tool

The Copy Dashboard tool replicates/copies the existing dashboard from one team to either single or m...

Read More >

Dashboard Migrator Tool

This is a web service which helps you to copy the VSTS dashboards from 1 team to another team easing...

Read More >

Share

Post a Comment

  • Recent
  • Popular
  • Tag
Monthly Archive
Subscribe
Name

Contact Us
  • *
  • *