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
74 stars 32 forks source link

Can we map a rule to a particular field only in work item? #86

Closed KamranAslamBhatti closed 4 years ago

KamranAslamBhatti commented 4 years ago

Hi, Is there a way we can map any rule to a specific field only, in the following command can we give field name so the rule myRule only fires/run when that particular field updated? As right now if any field updated the rule fires.

Current command aggregator-cli map.rule --verbose --project "myProject" --event workitem.updated --instance myInstance --rule myRule

Required command aggregator-cli map.rule --verbose --project "myProject" --event workitem.updated --instance myInstance --rule myRule --field System.Description

Thanks, Kamran

BobSilent commented 4 years ago

That's why we are going to introduce selfChanges, see example With this you can decide to skip your rule execution if a certain field was not changed. You can also get old and new value.

BUT: selfChanges is merged to master but you have to build and deploy the updated runtime in the install.instance command using the sourceUrl option.

giuliov commented 4 years ago

The answer to the original question is no: the Web Hook mechanism has limited filtering features. You have to filter on the receiving side, i.e. the rule must use some if statement to check what changed as @BobSilent suggested.

KamranAslamBhatti commented 4 years ago

Thanks Bob and giuliov for the prompt response.