tfsaggregator / aggregator-cli

A new version of Aggregator aiming at Azure DevOps (ex Visual Studio Team Services)
https://tfsaggregator.github.io/
Apache License 2.0
73 stars 32 forks source link

Question : Set read-only to a field #194

Closed vernou closed 3 years ago

vernou commented 3 years ago

I test 'aggregator-cli' in Docker on Azure DevOps Server 2019. The rule roll up effort from children task to user story parent. This work fine.

But the user can modify the effort's fields on user story and overwrite values set by the rule. A solution would be after roll up effort to set read-only to effort's fields?

With 'aggregator-cli', it's possible to set read-only on field?

giuliov commented 3 years ago

I cannot think of any practical way: the readOnly attribute (Field attributes) applies to the work item type, not to the individual work item.

On the other hand, if you trigger the same rule for both UserStory (parent level) and Tasks (children level), you can recompute the value and re-set if different. To avoid an infinite loop, test if the computed value does not match the current value before assigning.

vernou commented 3 years ago

Not perfect (3 updates in work item's history), but it's work. Thank.