Azure DevOps Work Item Types are a powerful tool for managing and tracking work in a software development project. They help you organize and prioritize tasks, bugs, and other work items in a structured way.
There are several types of work items available in Azure DevOps, including User Stories, Tasks, Bugs, and Features. Each type has its own set of fields and characteristics that are used to track and manage the work item.
User Stories, for example, are used to capture the requirements and features of a product or system. They typically have a brief description, acceptance criteria, and a set of tags or labels to categorize them.
Tasks, on the other hand, are used to break down large User Stories or Features into smaller, actionable items. They often have a detailed description, a set of links to related work items, and a status field to track progress.
By using these different types of work items, you can create a clear and organized workflow in Azure DevOps.
Customizing Work Item Types
Customizing Work Item Types is a powerful feature in Azure DevOps that allows you to tailor your work item types to suit your team's specific needs. You can include or revise fields within a work item type, introduce a personalized work item type, or adjust the display of work item types on backlogs and boards.
Customization is dependent on the process model assigned to your project, so be sure to check out the articles on process customization and inherited processes for more information. You can also use the witadmin deletefield command line tool to completely remove fields from the data store.
To add or modify a field, field rule, label, or empty text, you'll need to add it to the definition file, specifically the FIELDS section. You must also add it to the FORM section for it to appear on the work item form.
You can customize the work item form to accomplish various objectives, including adding or modifying a field, changing a field label, rearranging fields, and adding a group or page. However, you can't add field rules to restrict the workflow as you can't apply rules to system fields.
If you want to track bugs as requirements or tasks, your team can choose how to track them. They can track them along with requirements, showing them on the product backlog and board, or track them similar to tasks, typically linking them to a user story or product backlog item.
The following table summarizes the effect on existing work items when you modify fields or work item type definitions:
You can also modify the workflow by adding or removing a state, reason, or transition, specifying a value for a field to be applied during a change in state, reason, or transition, or specifying a custom ACTION to automate field assignments based on a change in state, reason, or transition.
Understanding Work Item Types
Work item types are used to track different types of work, such as testing, reviews, and feedback. There are various work item types available, including Code Review Request, Code Review Response, Feedback Request, and Feedback Response.
These work item types can be grouped into categories, such as testing, reviews, and feedback. For example, the Code Review Request is used to track a code review request against code maintained in a Team Foundation version control (TFVC) repository.
In Azure DevOps, work item types define the template of fields, workflow, and form for each type. They can be linked to each other to support tracking dependencies, roll up of work, and reports.
Definition
A work item is a database record that contains the definition, assignment, priority, and state of work. It's like a digital sticky note that helps you keep track of your tasks and projects.
A work item type defines the template of fields, workflow, and form for each type. You can think of it as a blueprint for creating work items.
You can add or modify a field to an existing work item type, or even create a custom work item type from scratch. This is useful when you need to capture specific information for a particular project or task.
The workflow state of a work item determines its progression from creation to closure. It can exist in only one state at a time, and you can query work items by State and other fields to list work in progress, resolved, or completed.
Here are some common work item types and when to use them:
- Epic: A large feature or project that takes a considerable amount of time and effort to complete.
- Feature: A high-level service or functionality that needs to be delivered and can be broken down into multiple User Stories.
- User Story: A discrete piece of functionality or quality that you need to deliver from a userβs perspective.
- Task: A manageable chunk of work that breaks down a User Story or Bug.
- Bug: A software issue that needs fixing.
By understanding work item types, you can effectively plan and track your work, and make the most of your project management tools.
Prerequisites
Before we dive into understanding work item types, let's make sure we have the necessary permissions to work with them. To list work item types, you must have your View project-level information permission for the project in the collection set to Allow.
To do this, you'll need to be a member of the Project Collection Administrators group or have your Edit process permission set to Allow.
If you're not already an administrator, you can get added by following the instructions in the "Change project collection-level permissions" section.
Working with Forms
Working with Forms is an essential part of managing work items in Azure DevOps. You can define and update a work item through its respective form, as well as through methods like bulk import, export, update, and modification.
The work item form contains several tabs, with the Details tab including common fields such as Title, Assigned To, State, Reason, Area, and Iteration. These fields can be updated at any time.
You can customize the work item form to add or modify fields, change field labels, rearrange fields, and more. However, you can't add field rules to restrict the workflow, and you can't apply rules to system fields.
Here are some common form controls you can use:
You can also use work item templates to quickly create work items with prepopulated values for commonly used fields.
Form
The form is where the magic happens when working with work items. It's where you define and update a work item through its respective form, as well as through methods like bulk import, export, update, and modification.
The form contains several tabs, with the Details tab being one of the most important. This tab includes common fields like Title, Assigned To, State, Reason, Area, and Iteration, which can be updated at any time.
You can also customize the form to fit your needs. This includes adding or modifying fields, changing field labels, rearranging fields, and even adding a group or page.
Some common form controls include the ability to copy the URL of a work item, go to the Discussions section, and refresh the work item with the latest changes. You can also revert changes to a work item or open the History tab to review changes made to the work item.
If you're working with multiple work items, you can use the Actions menu to perform tasks like moving a work item to a different project or sending an email with the work item.
Work item templates can also be used to quickly complete forms with prepopulated values for commonly used fields. This can save you a lot of time and effort when creating new work items.
Here are some common elements on work item forms that can be customized:
- Add or modify a field
- Change a field label
- Rearrange fields
- Add a group or page
- Add a group
- Add a custom control, group, or page
- Add informational text or hyperlinks
- Embed HTML text or display dynamic reports
- Add a links-control page
Keep in mind that you can't add field rules to restrict the workflow, and you can't apply rules to system fields.
Change Icon Color
Changing the icon color of a work item type is a straightforward process. You can do this by editing the process configuration in the web portal.
Work items appear in query results and on the backlog and board pages of the Agile tools. To change the color or icon associated with an existing work item type, you'll need to edit the process configuration.
To add a color to use for a new work item type, you'll also need to edit the process configuration. This will allow you to customize the visual representation of your work items.
Changing the color for a workflow state requires editing the process configuration as well. This will give you more control over how your work items are displayed.
Managing Fields and Rules
Managing fields and rules is crucial in Azure DevOps work item types. You can apply field rules when changing state, specifying a reason, or during a workflow transition.
Field rules can be used to qualify values, copy values, restrict modifications, enforce pattern matching, and conditionally apply rules based on values in other fields. The WHEN, WHENNOT, WHENCHANGED, and WHENNOTCHANGED rules can be used to conditionally apply rules.
To add or modify a field, field rule, label, or empty text, you add it to the FIELDS section of the definition file. System fields, whose reference name starts with System, are defined for all work item types, whether or not you include them in the work item type definition.
You can specify field rules to accomplish various actions, including qualifying values, copying values, and restricting modifications. The CANNOTLOSEVALUE, EMPTY, FROZEN, NOTSAMEAS, READONLY, and REQUIRED rules can be used to qualify values.
Here are some common actions that can be accomplished using field rules:
- Qualify the value a field can have
- Copy a value into a field
- Restrict who can modify a field
- Enforce pattern matching on a string field
- Conditionally apply rules based on values in other fields
To make a field appear on the work item form, you must also add it to the FORM section of the definition.
Navigation and Organization
Navigation and Organization can be a breeze with Azure DevOps work item types. The Follow, Refresh, Revert changes, and Actions menu controls appear on all work item forms.
You can use the Follow option to get updates when changes are made to a work item. For instance, if you're working on a user story and someone else makes changes while you had it open, you can choose Refresh to update the work item form with the latest changes.
To undo any changes you made to the work item form, simply choose Revert changes. This will revert your changes back to their original state.
Some menu options might not appear based on your permission assignments, so keep that in mind. Additional options might appear due to Marketplace extensions added to your organization or other customizations made to the work item type.
The Actions menu offers a variety of options, including New linked work item, Change type, and Move to team project. You can also Create copy of work item..., Send email with work item, Delete, Templates, New branch..., and Customize.
Here are some of the Actions menu options in a list:
- New linked work item
- Change type
- Move to team project
- Create copy of work item...
- Send email with work item
- Delete
- Templates
- New branch...
- Customize
Import/Export Files
Importing and exporting work item type definition files is a crucial step in customizing your project's process template. You need administration permissions for your project to perform these tasks.
To export a work item type definition file, you can use the witadmin command. For example, you can export the file using the following command: `witadmin exportwitd /collection:CollectionURL /p:ProjectName /n:TypeName /f:"DirectoryPath/FileName.xml"`. This command specifies the name of the work item type and a name for the file.
You can edit the exported file to modify or add a field. The file is in XML format, and you can use the Index to XML element definitions for more information on editing the file.
After editing the file, you can import it back into your project using the witadmin command: `witadmin importwitd /collection:CollectionURL /p:ProjectName /f:"DirectoryPath/FileName.xml"`. This command imports the definition file into your project based on the process model you use.
To view the changes, you need to open the web portal or refresh the page.
Best Practices and Planning
To use Azure DevOps work items effectively, it's essential to follow some best practices. Work items should flow from top to bottom, with Epics breaking down into Features, Features into User Stories, and User Stories into Tasks.
This hierarchical structure keeps your organization and work tracking clean. For example, Epics and Features should span multiple iterations, while User Stories should be sized to fit within a single iteration.
Here are some key points to keep in mind:
- Epics break down into Features, Features into User Stories, and User Stories into Tasks.
- Epics and Features will span multiple iterations, while User Stories should be sized to fit within a single iteration.
- User Stories should be user-focused, focusing on user value rather than technical details.
- Bugs should be linked to Tasks, and work item status should be used to track progress.
By following these best practices, you can ensure clear communication, efficient work management, and successful delivery of value to your users.
Best Practices
Best Practices are essential for effective team collaboration and project tracking. They help ensure clear communication, efficient work management, and successful delivery of value to users.
Work items should flow from top to bottom: Epics break down into Features, Features into User Stories, and User Stories into Tasks. This hierarchy keeps your organization and work tracking clean.
Tasks should be small enough to be completed within a day. This allows for better estimation and scheduling of work items.
User Stories should be user-focused. They should focus on user value, not technical details. Write them in a way that focuses on what the user wants to achieve.
Here are some key best practices to keep in mind:
By following these best practices, you can ensure that your team is working efficiently and effectively, and that your projects are delivered on time and to a high standard.
Plan and Track
Planning and tracking your work is a crucial part of any project, and Azure DevOps provides a robust set of tools to help you do just that.
You can build your project plan by creating a backlog of user stories that represent the work you want to develop and ship. These user stories should be user-focused, focusing on what the user wants to achieve, rather than technical details.
To ensure clear communication and efficient work management, it's essential to maintain a hierarchy of work items, with Epics breaking down into Features, Features breaking down into User Stories, and User Stories breaking down into Tasks. This hierarchy will keep your organization and work tracking clean.
Work items should be sized to fit your iterations, with Epics and Features spanning multiple iterations, User Stories fitting within a single iteration, and Tasks being small enough to be completed within a day.
Here's a summary of the workflow states for User Stories (Agile process):
By following these best practices and using the right work item types, you can ensure that your team is working efficiently and effectively, and that your project is delivered on time and to the required quality.
Frequently Asked Questions
How do I change work item types in Azure DevOps?
To modify work item types in Azure DevOps, navigate to the Work Item Types page and make changes from there, such as adding fields or modifying the layout.
Sources
- https://learn.microsoft.com/en-us/azure/devops/boards/work-items/about-work-items
- https://learn.microsoft.com/en-us/azure/devops/boards/work-items/guidance/agile-process
- https://learn.microsoft.com/en-us/azure/devops/reference/add-modify-wit
- https://medium.com/@syantien/understanding-and-implementing-azure-devops-work-items-571dc15cba22
- https://www.merkle.com/en/merkle-now/articles-blogs/2022/Feb/how-to-create-azure-devops-work-items-in-code.html
Featured Images: pexels.com