Hello,
I am trying to modify an AzDO work item on click. I am using the Azure DevOps connector, with the Update a work item method. Azure DevOps - Connectors | Microsoft Docs
I want to update the "System.State" of a work item to a different value. But, the connector keeps throwing errors.
I can get the Azure DevOps connector to update the "Title" with this command:
AzureDevOps.UpdateWorkItem("12345", "MyOrg", {title :"My New Title here" });
This works fine.
but doing this for "State" does not work.
AzureDevOps.UpdateWorkItem("12345", "MyOrg", {state:"My New state here" });
I also tried:
AzureDevOps.UpdateWorkItem("12345", "MyOrg", {dynamicFields: {state: "My New state here"}});
This gives a 400 error "message": "At least one operation is required for Apply."
and
AzureDevOps.UpdateWorkItem("12345", "MyOrg", {dynamicFields: { op: "add", path: "/fields/System.State", value: "My New state here"}});
This does not work. It follows the API definition here: Work Items - Update - REST API (Azure DevOps Work Item Tracking) | Microsoft Docs
and I also tried creating my own table and passing that in:
Set(NewStateTable, Table({op: "add", path: "/fields/System.State", value: "My New state here"}));
AzureDevOps.UpdateWorkItem(12345, "MyOrg", {userEnteredFields: NewStateTable});
None worked. The official docs are not helpful here.
Any ideas?
Thanks a lot!