How to default field based on project-level settings in Azure Devops? - azure-devops

I need to set a field on all User Stories, and that field will be the same for all stories within a project. Namely, I'm trying to assign projects to certain Project Leads and I want them to be defaulted as the Project Lead on all the user stories withing that project. How do I create a rule that will default a custom identity field to be the same for all user stories within that project? I'd rather not create a new Azure process for each new project. I want to be able to manually set some field on each project at the project level, and then have the default on my custom field in user stories within that project to be based on that project-level setting.

Currently this can't be done through process customization. Unless you create a custom process for each project.
The Aggregator-CLI can process a rule after a work-item is created/updated and you can use it to set these default values based on a lookup.
This one-click extension also makes it possible to run rules on the workitem form itself. It takes a different approach (runs in UI instead of from a servicehook).

Related

Azure DevOps Work item custom field as checkbox

I am setting up Azure DevOps to track Features and other work items. One of the things I want to track is what environment bug was found in.
My preference is to have a list of checkboxes user can check/uncheck.
I have not found any way to do this using default setup or the Marketplace.
Anybody who can help me out?
To use checkboxes, you can try the extension Multivalue control. Follow below steps to do that:
Install the extension Multivalue control
Navigate to the specific inherited process, select the work item
type (Task in this sample). Add a new field (BugType with Text (single line) in this sample, you can also create a picklist field
based on your requirements).
New group (BugType in this sample)
Add a custom control to Task, select the Multivalue control from
the control list.
In Options select the field created in step2, and enter the bug
type you want to set (e.g Dev;Test;Pord). OK to save the
configuration.
Open a Task work item to verify the checkboxes.
You can add a Boolean field:
Then you can use checkboxes:

How to automatically update the Assigned To on a User Story when state changes in Azure DevOps Board

We have a typical board with the following columns.
New
Groomed
In Dev
Ready for QA
In QA
Ready for release
Released
When we click and drag a user story from one column to another, we'd like it to update the "assigned to" field automatically depending on which stage its in. We're not seeing any settings from which to accomplish this from the Azure DevOps UI. Any suggestions?
You could customize the Process to achieve what you want:
Customize States for each column in user story work item type (The process for your team project should be an inherited process). Go to the Organization Setting -- Process, choose the inherited Process your team project used, and then choose user story work item type. Click States tab and add appropriate states for each column. Check the following example:
Add rules for user story work item type. Click Rules tab, and add following rule for each State:

Adding to State Picklist in Azure DevOps Service

I'm using Azure DevOps Service (the on-line version, not on-premise) with Agile methodology.
I'm trying to add a custom state of 'Testing'. I use the method described here, but this doesn't seem to work. I can add Testing as a column in the sprint board, but it doesn't appear in the State picklist values (I do understand that adding a column will not add a State).
How can I get this to appear in the State picklist?
How can I get this to appear in the State picklist?
1.You can quickly navigate to the process your current project belongs to via Project settings => Overview => Project Details.
Then you can modify the states there. If you want to add a Testing state to Bug WorkItem type, click the Bug and click the new state:
2.And we should know that only inherited process can be modified in this way. So we must make sure our project is created from inherited process. Otherwise the New State button is disabled.

Azure DevOps: Field with default value containing another fields value

I am trying to find a way in Azure DevOps of displaying a field on a User Story layout that is made up of a URL plus the value of another field on the same story.
We have an external support ticket system where all of our support calls are logged. When the story (or even Defect) is created, we have a field where a support reference is entered.
I want another field that combines a URL and the support reference so it creates a link to the support ticket.
Is this do-able?
Thanks,
Craig
This is achievable. You can Add a custom field to a work item type for an inherited process.
1,First you need to create a inherited process.
Go to Organization settings, From the Process page under Boards, open the … context menu of the process you'll use to create an inherited process, and then choose Create inherited process. Choose the same system process—Agile, Basic, Scrum, or CMMI—that was used to create the project that you want to customize.
2, Add a custom field to an existing work item type for the inherited process.
From the Process page of the selected inherited process, choose the work item type(User Story) you want to add the custom field to.
Select the work item type and click new field or ... to add a field under a group.
For example i add a new field Support Url under group Planning(click Options to define a default value for this field).
3, Apply the customized process to your project.
Click team projects of the process shown as below screenshot.
Open the … context menu for the process and choose the Change team projects… option.
Then you will have the custom field with default value for the work item type in your project.
For detailed steps please check Microsoft Document there.
Update:
Field value made up of a static part, plus another field
There is no direct way or any tool i can find to achieve this. However there is a complicate workaround to achieve this.
You can try creating a service server to to combine the field values and update the workitem field with workitem update rest api, and add a service hook to this service server.
You can refer to the service hook sever provided by Microsoft. Check reate a pull request status server with Node.js

How to set required fields and default values for work items

I am using Visual Studio Team Services for my project, and accessing it via the web. I am using the Scrum template.
I am trying to figure out how to set default values for Task fields. For example, for the task's Activity field, I want to make it a required field, and set the default value to "Development" whenever I add a new task.
How can I do this?
TFS
On TFS you need to customize the process template to provide a <DEFAULT> rule. To change the process template you need to use witadmin to export the workitem type definition you want to change, then edit the XML to add the rule you want, in your case a <DEFAULT> rule on the transition to the default state. The re-import the workitem type definition.
The process/rules are explained here:
Define a default value or copy a value to a field
Modify or add a custom work item type (WIT)
VS-Team-Services
On Visual Studio Team Services this option does not exist yet for system fields. The features for process customization have been released in the past months and are rapidly evolving. It's probably a short wait until these features will be available.
What you can do is use the "Template" link on the work item form to create a bookmark that will open the work item form with a number of fields pre-filled.