Azure DevOps Bulk Updating a Custom Field - azure-devops

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.

Related

Azure DevOps - Querying value from Custom Control

Is it possible to add selected value from custom control to Azure DevOps queries ?
Our current extension is a dropdown with specific value. After select the single one, this value copies to new "custom" work item field (just simple single line field with specific name). We do that because in Azure DevOps queries we can't select custom control, only fields.
But this is a pile of extra fields. I just want to add custom dropdown with my data, select single item, save it and able to query this value in future

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 can i view the Created Date and the Owner of the Field in Azure DevOps

I am working on Azure DevOps and I know little about the product. I want to view the field history when it is created and by whom it is created and last modified.
I have gone through a couple of things in docs but it didn't help me.
Research up till Now
It shows me the fields but no information other than when I clicked on fields it gives me an option to delete the field.
Path
Organization Setting > Process > Fields
How can i view the Created Date and the Owner of the Field in Azure DevOps
Indeed, there is no such out of box way to get the Created Date and the Owner of the Field.
As a workaround, we could add a custom field in our custom process and set the value to 1 when the field is defined with a value. For example, I create a MyCustomFiled field and add rule to set the MyCustomFiled to 1 if the target field is defined:
In this case, when the target field is created by some one, our custom filed will be set with value 1.
Next, we create a query with following Filters:
Now, we could get the Created Date and the Owner of the Field.
Update:
what about the fields that are already created?
For this situation, we could query workitems whose fields have been modified according to the opposite conditions, for example, the Description field:
If this workaround still not work for you, you could try to use REST API Revisions - Get to get all the history for one workitem, use scripts to filter the revision about the specify field, then loop through all the workitems.
GET https://dev.azure.com/{organization}/{project}/_apis/wit/workItems/{id}/revisions/{revisionNumber}?api-version=5.1
Hope this helps.

How to automatically populate Custom Item Field with data from a saved report in NetSuite?

Software Platform - NetSuite
Goal - Run a weekly sales report. Use the data from that report to populate a custom item field on the item record (Kit item) in NetSuite.
Can this be done using a workflow or???
Before you try to write a Script or create a Workflow, I recommend you investigate NetSuite's ability to populate Custom Fields with Search Results.
Check out the Help page titled Creating Custom Fields with Values Derived from Summary Search Results for the details.
The basic process will involve creating a Saved Search that generates the data you need, then using the Validation and Defaulting tab on your Custom Item field to select the Search you created.
This should be done using SuiteScript. In your script, run a search, store the data as JSON, and submit the data to the item record. You could submit the data into a single text field on the item record, but it would be better to create a Custom Record Type "Sales Report" which has a list/record field sourced from the item and with the "Record Is Parent" checkbox checked. This will display your custom record on the item in a sublist. Using a Custom Record Type will allow you to store the data over multiple iterations. If you use a field on the item record it will be replaced each time you run the script.

Word Mail Merge Fields

I have not worked with Mail Merge fields before and everything I find requires you to select a data source prior to be able to insert merge fields. All I want to do is place fields on the word document and not merge it down until its consumed by the code. I essentially am creating document templates. How is this done in word?
As Noah said, it is probably easiest to set up a dummy data source containing the available fields, especially if you haven't worked with Mail Merge before.
However, Word fields can be created completed manually. Press Alt+I and then F (on an English Word) to open the Insert Fields dialog (For Word XP/2003 you will find the same in the Insert menu, for Word 2007 the dialog is available from the Insert tab of the ribbon under Quick Parts). In this dialog you can select the mail merge fields and specify all relevant options, e.g. a field of type MergeField.
If you know the field code (and the relevant options) you can also insert the field directly by pressing Ctrl+F9 followed by the field code (Note that you can toggle the display of field codes using Alt+F9). This is a very convenient - albeit advanced - way when creating templates.
I would follow this Microsoft article. If you don't have the data source available, I would simply create a dummy Excel/Access/data source with the fields that you will have. Word prefers to know what fields are available and you can change the source once your template document is built.