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

How to specify multiple fields to filter by when mapping a rule #233

Closed apoutney closed 3 years ago

apoutney commented 3 years ago

I am trying to map a rule so that it only triggers if field 'A' or field 'B' of a user story are updated but I'm not sure how to include multiple fields in the filterFields property

This is an example of what I have tried

aggregator-cli map.rule --verbose --project 'MyProject' --event workitem.updated --instance 'MyInstance' --resourceGroup 'MyResourceGroup' --rule userstory_fieldAOrB_changed --filterType 'User Story' --filterFields 'Custom.A Custom.B'

I have tried comma separating the fields, wrapping them in an array, using other delimiters but the rule never triggers (presumably its looking for a field called 'Custom.A Custom.B')

The documentation suggests its possible to to filter by multiple fields, but I cant find any example as to how.

Can anyone help with this?

giuliov commented 3 years ago

Should be possible. Both --filterFields 'Custom.A' 'Custom.B' and --filterFields 'Custom.A' --filterFields 'Custom.B' should work.

apoutney commented 3 years ago

@giuliov, Thanks for the reply, I thought so to, but have tried both of these without any luck

When using --filterFields 'Custom.A' --filterFields 'Custom.B' the powershell command fails and doesnt generate the mapping

When using --filterFields 'Custom.A' 'Custom.B' The mapping is generated, the webhook appears ok in Azure DevOps, but the rule function never gets triggered

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.