Azure DevOps - Querying value from Custom Control - azure-devops

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

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 to iterare all the excel sheets present in a excel file in azure data factory

I have an Excel file with 5 sheets: Sheet1, Sheet2, Sheet3, Sheet4, Sheet 5.
In the future, the user can add Sheet6, Sheet7 as well.
I want to create a pipeline to copy all the sheet data into a single table. I want to iterate all the sheets in excel and copy the data from Sheet to a single table.
As per my approach, I have created an Array variable and assigned ["Sheet1", "Sheet2", "Sheet3", "Sheet4", "Sheet5"] and I am using a Foreach loop and Inside Foreach, I am copying the Sheet data to a single table.
In my second approach, I am using a Lookup activity to fetch the sheet info from a SQL table and then using foreach loop to copy the sheet's data into the table.
But, in both the approach, whenever a user adds a new sheet, either, I need to update my ADF pipeline (approach 1) or I need to update my SQL table where Sheet info is present.
I don't want to update either the pipeline or SQL table to fetch data from the new additional sheet. It should iterate dynamically and loads all the sheets' data to a single table. It will do always truncate and load.
Currently getting the sheetnames dynamically in ADF is not possible.
So you would have to write a custom logic to get the list of sheet names and then iterate it over foreach.
For that you can leverage Azure automation/Azure function etc and call them in ADF
ADF - How to copy an Excel Sheet with Multiple Sheets into separate .csv files
I am afraid that this feature is available at this point of time, as Excel is still relatively new for ADF v2, this feature might not be there, but you can submit a feedback or create a feature request for this with Microsoft here
For continuing the job, you will have to follow the same approach that you are using, adding the names of sheet manually
Alternatively, if you don't want to add the names of the sheet then you can provide the user access to update the ADF parameter by giving a custom role to just update it and then inform them to update the parameter list as soon as they add a new sheet
Thanks!

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.