Azure DevOps: Field with default value containing another fields value - azure-devops

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

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 default field based on project-level settings in 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).

Child work types inheriting field values from parent item

I am working through creating a custom process in Azure DevOps and was curious if field values from parent can be shared with child items.
Here is an example:
Create field 'Custom Field 9' on Epic work type
Create the same field 'Custom Field 9' on Product Backlog Item work type
Create an epic and fill in the value of 'Custom Field 9'
Create a child Product Backlog Item, 'Custom Field 9' is then inherited to the backlog items field.
What I've tried so far is to use a rule on either Epic or Product Backlog Item, however, I do not believe the rules can apply to creation of children processes.
One other option I'm going to try later today is a Flow that detects when a child work item is created and perform it automatically. I'd like to try to keep this contained to Azure DevOps if possible.
Edit: Thought it helpful to mention that we are using the hosted solution of DevOps and nothing on premise.
Sorry to say that as default, there does not such a work item features with "out of the box". But you can use another tool to achieve this.
Like you said, Microsoft Flow, there does not such feature supported while connect with Azure Devops.
But, in addiiton, I think you can do this with writing some custom scripts. And then configure Web hook to trigger this custom events.
Also, here has another tool named TFS Aggregator (Web Service) to achieve what you want. You can set and configure apply certain rules (such as copying fields from a parent item to a child item). And it will trigger after a work item is created or saved.
I know this is very inconvenient, here has an same feature suggest which raised by others. They has the same demand with you. You can vote and comment for this suggestion. When there are enough communities vote and add comments for this feedback, the product team member will take this feedback seriously.
I needed this feature as well, but in it's absence I have got it to work (relatively easily) with an Azure Logic App (for anyone also using Azure)
​Trigger
When a work item is created
Then
​Get work item details using "Parent" as the work item ID to search for
​Finally
​Update the new work item with any field from the parent you require
​
​

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.

is it possible to show contact number of current logged in user when artifact is created in tuleap

We are using the Tuleap 7.0 for Project management. We have a new requirement that we need to show the contact number of current logged in user when a artifact is submitted either in a separate field or in the same field (submitted by). Is it possible to show or what type of code change has to be done, to retrieve the current logged in user information when artifact is created. Kindly do needful.
That's not easy. There are two main steps: one surrounding the user; the other surrounding the artifact.
First you would need to edit PFUser.class.php to add the property to the user object. You would also probably need to create a forgeupgrade script (database upgrade) so that you could save and modify the property. Obviously the UI and scripts that manage the CRUD of a user would also need changing.
Next, you would need to create a new type of class that extends TrackerformElementField, make that type available for use in the Tracker Field administration and set its value to the user's contact number.
Unfortunately, any of these modifications, if not done carefully, can have important side-effects. If you want to write your code and have it reviewed by the community, you can go through gerrit.tuleap.net and read the developer guide