process-migrator icon indicating copy to clipboard operation
process-migrator copied to clipboard

System Default Date fields not getting updated for Custom WIT types

Open Prateek1584990 opened this issue 4 years ago • 11 comments

I have a azure devops org in which I have inherited Agile process template where we have added custom WITs with states New,Active,Resolved , Closed.

The custom WITs are not updated with system default date fields "Activated Date" and "Resolved Date" when the state changes to either "Active" or "Resolved". The same works for the existing work items of the template like Bug/User Story or Task.

Can anyone help me on how we can get this issue fixed for custom work items as well.

Prateek1584990 avatar Jun 03 '20 21:06 Prateek1584990

Hi @Prateek1584990, I had the same issue and just created rules for custom WITs: "When a work item state changes to Active then copy value from Microsoft.VSTS.Common.StateChangeDate to Microsoft.VSTS.Common.ActivatedDate" activateddate You can actually use the field names (like Microsoft.VSTS.Common.ActivatedDate) in the drop downs of the rule editor even if they are not listed. I also added rules to clear the activated or closed date of the custom WITs if the work item is moved back to a previous state.

Gizmo0815 avatar Jun 04 '20 06:06 Gizmo0815

Hi @Gizmo0815,

When I try making a post call on creating rule it gives me below response, Rule: When state changes to "Active", copy value from Microsoft.VSTS.Common.StateChangeDate to Microsoft.VSTS.Common.ActivatedDate"

Response: { "$id": "1", "innerException": null, "message": "VS402809: System.ChangedDate is an invalid value for field type DateTime. Change the field value and try again.", "typeName": "Microsoft.Azure.Boards.WebApi.Common.FieldRuleModelValidationException, Microsoft.Azure.Boards.WebApi.Common", "typeKey": "FieldRuleModelValidationException", "errorCode": 0, "eventId": 3000 }

Prateek1584990 avatar Jun 04 '20 08:06 Prateek1584990

I configured the rules in the UI not over the API. Make sure all WITs have the closed and activated fields added to their layout and that they are of the date/time type. Are you using Azure DevOps Services or Server?

Gizmo0815 avatar Jun 04 '20 10:06 Gizmo0815

Hi @Gizmo0815

We want to try it with API calls and we want our tool to update rules irrespective of Azure Devops Services (or) Azure Devops Server.

Prateek1584990 avatar Jun 11 '20 19:06 Prateek1584990

Hi @Gizmo0815

We tried from UI and using postman api calls as well, (in the Azure Devops Services) it did not work for custom WITs to changed the system default date fields for them.

Request your help on the same

Prateek1584990 avatar Jun 15 '20 21:06 Prateek1584990

Hi All,

Can anyone help me by providing resolution

Thanks

Prateek1584990 avatar Jun 23 '20 18:06 Prateek1584990

Hi @Prateek1584990,

I set up a new organization in Azure DevOps and tried to rebuild what is working in my other organization and ran into the same issue like you. I suppose MSFT removed these fields from the rules and didn't want to break existing ones. I better don't touch these rules anymore. The only thing I can image that you could do is an Azure Logic App that triggers on state changes and sets the dates in the corresponsing fields. However each execution of the logic app will cost you a small amount. Or you build something yourself using webhooks.

Gizmo0815 avatar Jun 23 '20 20:06 Gizmo0815

@Prateek1584990: The latest release should fix your problem: https://docs.microsoft.com/en-us/azure/devops/release-notes/2020/sprint-172-update#improved-rules-for-activated-and-resolved-fields

Gizmo0815 avatar Jul 15 '20 13:07 Gizmo0815

H @Gizmo0815 , Thanks for the response , i did a quick check by creating a copy of Agile template and adding custom WIT type "test" with Active and Resolved state changes . but i dont see it is reflected.PFB the snip

image

Prateek1584990 avatar Jul 15 '20 15:07 Prateek1584990

@Prateek1584990: Check if your tenant already has the Sprint 172 Update (lower left corner on your organization project page), they seem to roll out in different waves. Sprint 172 Update is from July 9th. One of our customers tenants is always some weeks ahead of our own tenant.

Gizmo0815 avatar Jul 15 '20 15:07 Gizmo0815

Hi @Gizmo0815

I see that Sprint 171 Update is there on the left corner on my org page.

So, do you have any idea what would be the maximum time to roll out to all the orgs?

image

Prateek1584990 avatar Jul 15 '20 15:07 Prateek1584990

Our team is dedicated to providing continuous support for this extension. To ensure efficient issue resolution, we will close any old or inactive issues. If you come across any new problems, please create a ticket, and we will promptly address and resolve them. Thank you for your cooperation and understanding.

AminTi avatar Jul 14 '23 06:07 AminTi