process-migrator
process-migrator copied to clipboard
System Default Date fields not getting updated for Custom WIT types
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.
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"
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.
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 }
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?
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.
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
Hi All,
Can anyone help me by providing resolution
Thanks
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.
@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
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
@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.
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?
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.