Filter on Custom Fields - azure-devops

We have added 5 custom fields but are unable to find a way to filter based on data in these fields. Anyone any ideas or resolved this?
Custom fields have been added in VSTS using customization under Process settings.

The feature is available in VSTS.
Below is the detail steps to add a custom field and filter query work items based on the custom field (you can compare with your steps):
1. Add a custom field
In the Process page (https://account.visualstudio.com/_admin/_process) -> Processes Tab -> select the inherited process -> select the work item type you want to add a field (such as PBI in the example) -> New field -> specify the field you add (it's newField in the example).
2. Query work items based on the custom field
Go to a project which you are using the inherited process -> Work Hub -> Queries Tab -> specify the custom field to filter the work items.

At this moment there is no support for this on Boards and Backlogs. Queries as described by Marian might be your best bet. There is an open ticket for it. Please vote to (hopefully) prioritize this.
https://developercommunity.visualstudio.com/idea/606538/add-the-ability-to-filter-boards-by-custom-fields.html
https://developercommunity.visualstudio.com/content/problem/1270736/how-can-i-add-my-custom-filter-columns-in-boards-a.html

Related

Azure DevOps Bulk Updating a Custom Field

All,
I have a custom field that was added to TFS Azure DevOps and now I need to update any Feature or Story that have a certain text in that field.
Example:
Custom field: PGM0001234
(present both on Features and Stories)
Change to: PROG0004567
Is there a way to do that either on the backend or VisualStudio? There are thousands of work items that need updating so it's not like it's less than 100 feature/stories.
Yes. Create a new Query from ../_queries and set the Field to your custom field.
Run the query, and the results will contain all items where your custom field contains the value PGM0001234.
In the results set, select all and then click the ... after one of the items and choose Edit from the menu.
In the Edit work items dialog, select your custom field and assign new value in the Value field. Click OK and you'll be taken back to the query results with everything in bold. Press 'Save Items` and TFS will then apply the change.
TFS may complain that some fields contain invalid fields, such as Assigned To is a user who has left the business. You may need to bulk-reassign those items to another user in the Edit work items dialog.
Another option is to use Excel. Create a query like the one mentioned above, then open that query in the Excel plugin for Azure DevOps. Do a search and replace or other bulk edit in excel and then het the publish changes button.
Excel is a really convenient way to bulk edit work items.

How can I create a custom rule when changing board column in Azure Devops Boards?

I am trying to create a custom rule so that a custom field must be defined when moving a card to a specific board column but can't find how to do it.
Something in the lines of:
When board column changes value to "Deploy" make custom field "Target" required.
A user should not be able to move a card to column "Deploy" whithout field "Target" being defined.
Any suggestions?
There is a similar question but the only answer to that is using state changes isn't applicable for this particular column change.
The Board Column are not fields of work items as Shamrai mentioned. I am afraid it cannot be done by using the column Name.
The workaround is to map the columns to different states. And then add custom rule by using the workitem state changes.
Click the Gear icon on the Boards page, Navigate to Columns. See below:
You can add Custom State for User Story,Feature and Epic, if there are not enough states to map with the columns.
Go to Organization Settings--> Process under Boards-->Select the inherited process the your project using-->Click User Story(or Feature and Epic)-->Navigate to State and Add new State.
Now you can create the custom rule to make the Target field required when the state of the work item is changed (moved to a different column).
That`s a problem because Board Column, Board Lane, and Board Column Done fields are not available in the fields list to assign rules. I think you may try the following:
Add custom state "Deploy" and assign it to your column. Then use rules.
Create a custom application that queries Deploy without Target and returns such work items with comments "where is your target?" How can I find all work items in a given board column via Azure DevOps API? , How to update the work item from Powershell For VSTS?

How to bring custom fields created under inherited process in Azure DevOps Queries

I created a inherited process under inherited Scrum process (like 'X-Scrum') and added new fields like the below,
X.Original Estimate (Decimal)
X.Completed work (Decimal)
X.Remaining work (Decimal)
This is successfully done and reflected in the task screen.
Issue/ Help required:
I'm not able to bring those three fields into QUERIES, as I would like to extract all product backlog item, tasks and related custom fields.
Can someone help me on how to bring the custom fields into the queries.
Some special characters are prohibited for the Definition name of the custom field. If you add a new field with one of them(eg. .,()), you will get below error.
However you can change the Label of the field in the Layout section, which will be displayed in the task screen
In the QUERIES, only the Definition Name is showing up in the fields
So I guess you just changed the Layout Label of the custom field as X.Original Estimate (Decimal). But the Definition Name of the custom field is not X.Original Estimate (Decimal). Yon need to check what is Name for the field in Definition section. The Queries will reflect this Name.

How to add a message in Azure DevOps work item template, "Select a value to field 'XYZ'", without marking that field a mandatory?

How can we notify a user to select a value to a drop-down field in Azure DevOps work item without making it a required field.
The reason of not making it mandatory is because it is not a compulsory information.
But the reason for this 'way to notify' is to make sure that this value is to be filled when it is relevant (which is most of the time - but not all the time).
There is no option to add a notification on a field without making it mandatory, but there is a workaround to force the user to think about the value of the field.
You can add an additional boolean field who is enabled by default. This field can be used to create a rule for your original field, to indicate if it is required or not.
So to set this up you have to add the following fields/rules to your work item type:
2 fields:
originalFieldName (the field with extra attention)
booleanFieldName (Boolean, default value: true)
2 Rules:
When a work item is created
Then set the value of booleanFieldName to 1
When the value of booleanFieldName Equals 1
Then make originalFieldName required
With this solution the user always have to fill in the field or make the field is optional by deselecting the boolean field.
If you just want a message to be displayed in the work item to notify user to select a value. There is a workaround that you can create a customized process. You can customize the fields and pages in the your custom process.
For testing, i create a custom process and add a notification text to a group name to indicate use to select a value for a field. Please refer to below step.
1, Go to the Process section in the Organization Settings, and select the process that you want your custom process inherit from.
2, Then choose the work item type you want to edit. You can edit or add a fields or group to the work item type. For below example, i edit the title for Planning group to add a notification message.
For more information about custom process please refer the official documents.
If you already choose a process to your project. You can refer the detailed steps here to change your project process to the customized process.
Hope you find above helpful.

In SharePoint How to create a form that changes based on a drop down selection

I need to create a dynamic form/workflow in SharePoint. What I am trying to do is create a form that has a drop-down selector with 2 options Projects and Proposals. Depending on which of those two the submitter chooses the form will change which fields are displayed in the form below them.
The goal is the have the form populate 1 list and just populate different fields depending on the form type chosen.
Is this easily doable?
Our SharePoint environment is being provided by Microsoft's Office365 solution.
Did you try Content Types ? You'll not get drop-down (however I've seen drop-down for document libraries with content types), but you can achieve your target: when creating new item you can select which type of item to create (Project or Proposal) and when you'll get fields according to that content type. All data will be stored in the same table.