Customization of Work Items in Azure DevOps and Azure DevOps Server 2020

Posted by: Gouri Sohoni , on 5/20/2021, in Category DevOps
Views: 2849
Abstract: This Azure DevOps Tutorial tutorial discusses the need of customization of process along with creation of new work item. It also discusses how a new field can be added with the rules if required. We will also briefly discuss the difference between the customization process in Azure DevOps and the on-premises Azure DevOps Server.

When a development team starts working with Azure Boards service of Azure DevOps, some team members may realize that they need to configure some features to suite the team’s requirement. They may need to customize a feature so that the result can satisfy the needs of the process that is adopted, rather  than using an out of box functionality.

This leads to customization for various aspects in Azure DevOps, which is available as follows:

  • Team level customization: Customize specific tools from team’s perspective like portfolio management
  • Project level customization: Customize work item types (add or modify)
  • Security access to team members: grant access or restrict access to work item tracking tools to team members

In this tutorial, I will be focusing on the second option which is how to do customization of work items types.

I will provide details about how to do customization in Azure DevOps. I will demonstrate how an inherited process can be used to change or add work item type with project specific needs. I will also provide a few glimpses of customization of work item types for on-premises version i.e. Azure DevOps Server 2020.

Customize Process in Azure DevOps

When we want to create a team project in Azure DevOps, we have four process  options to choose from – Basic, Agile, CMMI and Scrum.

A process defines the work items, their tracking and their behavior. We cannot customize any of the these out of box process, they always remain as they are, since many projects may depend upon them. If we want to customize a process, we need to inherit an existing process first. This will create a process that can be customized to suite our requirements. The system defined process may get an update from Microsoft, and this will be automatically updated to your inherited process.

Normally customization is done to add a work item type (WIT) or modify the existing work item type to suite our requirement. Work Item Type commonly called as WIT can be modified by adding new fields, changing layout, adding rules. We can even change the workflow of WIT.

Let us now find out how to create inherited process. I am taking Scrum as the base process, but the same can be applicable to other processes too. We will then add a new work item type called as Ticket to it. Let us provide a default value to the priority field of it and see how to add a rule which does not allow the value of that field to go beyond a limit.

Creating Inherited Process

I am assuming that the team is working as a maintenance team and because of which needs a particular work item of type Ticket. By default, Azure DevOps does not provide such work item. The work item also requires a priority for this ticket.

1. As a first step, we create a new organization in Azure DevOps. Follow these steps if you do not already have an organization. It is very easy to create an organization in Azure DevOps.

Use https://dev.azure.com link to create a free account. You can click on Start Free button to continue, use any Microsoft Live Account like outlook.com or Hotmail.com. You may even use your Gmail account if it is linked to your Microsoft account.

2. Once the account is ready, select the Organization Settings blade, select Process from Boards

3. Click on the ellipse button for Scrum Process to see the menu for inherited process.

azure-devops-create-inherited-process

Provide the name for the process and click on Create Process.

create-inherited-process-name

4. Now this inherited process is available for customization. Select the process to find if it is possible to create a new work item type. Provide name, select icon, color and click on Create.

 

Note: When you add a new Field, it is available to any other inherited process.

create-work-item-type

Adding a Field to Ticket

5. Adding a new field to the ticket is pretty simple. Click on New Field and provide the required details.

add-new-field-wit

Provide the details for Options like whether the field is required and what is default value for it.

add-new-field-ticket-2

Provide the place where the new field should be displayed.

add-new-field-ticket-3

6. Now that the new field is added to the work item type, let us change the state transitions for the same. Select State tab and you will find the default states as follows:

Note: We need to provide category for the state. It is not possible to add a new Category. Be careful when you are removing any state if there are already existing work items.

default-states-wit

Remember that for an existing work item, you can only add or hide existing states, you cannot remove any.

remove-state-new-wit

7. I have added one state as Escalated and changed Done to Resolved as follows:

changed-states-wit

8. We will now open the Rules tab and add a rule. I have added a rule which changes the value of ticket priority field to High automatically when the state is changed to Escalated.

new-azure-devops-workitem-rule

9. Now it is time to create a Team Project based on the new Process and find out if the features are working as expected.

team-project-inherited-process

10. Now select Boards > New work Item and you get the newly added Work Item Type > Ticket

new-wit-added-to-boards

11. Create a new Ticket, change the state to Escalated and observe the rule changing the priority to High automatically.

workitem-rule-working

 

Now that we have seen how to do customization for inherited process, let us find out how XML process can be created for a collection in Azure DevOps Server 2020 and how the template can be exported for customization.

XML Process for a Collection in Azure DevOps Server 2020

The collection concept is still available for on premises functionality – Azure DevOps Server 2020.

We can start Azure DevOps Server Administration Console and select the option for Create Collection. Collection was introduced in TFS 2010 so as to provide isolation of data stored for different collections. Each collection can create a new database on SQL Server.

xml-based-team-project-collection

Observe the two different ways to create Team Project Collection in the diagram above. The XML collection as shown is based on the legacy process which is available for many years.

There is a separate extension available with Visual Studio for the Process Editor. This provides the same functionality as earlier.

process-template-editor-extension

Let us find out the steps for doing customization to the work item and the process.

12. Select the Collection Settings for the collection created with XML process, select Process under Boards and click on ellipse to get following options:

uploaded-xml-template

You can view the Export option which will download the complete information for the process. The following folder structure is observed:

zip-for-process

13. Once the extension is installed, we can open ProcessTemplate.xml from Visual Studio to do modifications.

process-template-editor

14. Once the process is opened in editor, we can do the required changes to work item type definitions or wherever applicable, and save the file(s). Create a zip file which can be uploaded to use for the customized process.

Note: Do not forget to change the name of the process and the GUID of it. The name can be changed in the Visual Studio Process Editor, but GUID needs to be changed by opening an XML file separately.

change-process-name-xml

15. It is possible to change the existing definitions of these work items if needed.

Note: This functionality is different than the inherited template.

16. A new field can be created, which needs to have a reference name. The type of the field can be selected from the given types like string, integer, double, date time, text, HTML, tree path, history or Boolean.

Note: The new field does not get added automatically to the Web UI. When we open the work item, we do not find it there. We need to add information related to this new field to the WebLayout tag.

new-weblayout-tag

Once the customized process is uploaded, it looks as follows

uploaded-xml-template

Observe that this process is not locked like all others are.

These customized processes can help in bridging the gap between the expectations and features available with either Azure DevOps or Azure DevOps Server.

This xml process is available in Azure DevOps Server but is it possible to have it in Azure DevOps?

The answer is not straight forward. If you have migrated from Team Foundation Server (TFS)/ Azure DevOps Server to Azure DevOps and you had selected the option of this xml template earlier, then after migration, you will get the process in Azure DevOps. But if you are creating a new account/ organization with Azure DevOps, the option is not available.

Conclusion

In this tutorial, I discussed the need of customization of process along with creation of new work item. I also discussed how a new field can be added with the rules if required.

There is a difference between the customization process in Azure DevOps and the on-premises Azure DevOps Server. An existing work item type can be modified in Azure DevOps Server.

This article was technically reviewed by Subodh Sohoni.

 

 

This article has been editorially reviewed by Suprotim Agarwal.

Absolutely Awesome Book on C# and .NET

C# and .NET have been around for a very long time, but their constant growth means there’s always more to learn.

We at DotNetCurry are very excited to announce The Absolutely Awesome Book on C# and .NET. This is a 500 pages concise technical eBook available in PDF, ePub (iPad), and Mobi (Kindle).

Organized around concepts, this Book aims to provide a concise, yet solid foundation in C# and .NET, covering C# 6.0, C# 7.0 and .NET Core, with chapters on the latest .NET Core 3.0, .NET Standard and C# 8.0 (final release) too. Use these concepts to deepen your existing knowledge of C# and .NET, to have a solid grasp of the latest in C# and .NET OR to crack your next .NET Interview.

Click here to Explore the Table of Contents or Download Sample Chapters!

What Others Are Reading!
Was this article worth reading? Share it with fellow developers too. Thanks!
Share on LinkedIn
Share on Google+

Author
Gouri is a Trainer and Consultant on Azure DevOps and Azure Development. She has an experience of three decades in software training and consulting. She is a graduate from Pune University and PGDCA from Pune University. Gouri is a Microsoft Most Valuable Professional (MVP)  - Developer Technologies (Azure DevOps), Microsoft Certified Trainer (MCT) and a Microsoft Certified Azure DevOps Engineer Expert. She has conducted over 150 corporate trainings on various Microsoft technologies. She is a speaker with Pune User Group and has conducted sessions on Azure DevOps, SQL Server Business Intelligence and Mobile Application Development. Gouri has written more than 75 articles on Azure DevOps, TFS, SQL Server Business Intelligence and SQL Azure which are published on www.sqlservercurry.com and www.dotnetcurry.com. You can connect with her on LinkedIn.


Page copy protected against web site content infringement 	by Copyscape




Feedback - Leave us some adulation, criticism and everything in between!

Categories

JOIN OUR COMMUNITY

POPULAR ARTICLES

Tags

JQUERY COOKBOOK

jQuery CookBook