changedetection.io icon indicating copy to clipboard operation
changedetection.io copied to clipboard

setting Group level jq/json filters conflict with watch level filters in unexpected ways

Open jsnfwlr opened this issue 2 years ago • 1 comments

I have watches set for:

They are all in a group together, and each watch has it's own filter:

  • changedetection.io: jq:.tag_name
  • sonarr: jq:.updatePackage.version
  • kanboard: jq:.[0].name

These worked well.

Then I saw that groups had a filter option, and I thought that it would operate in the same way the system wide notification option does - over ridden by the notification option on a watch. So I set a filter of jq:.tag_name for the group and then added a new watch

The next time the checks for CD, Sonarr, Kanboard, Radarr ran, I got some strange results:

  • CD showed "0.45.3" "0.45.3"
  • Sonarr and Kanboard errored saying the jq:.tag_name filter didn't match
  • Radarr worked as expected

For watches with a watch level filter and content that matches the group level filter and the watch level filter, the output is duplicated.

For watches with a watch level filter and content that failed the group level filter, but would have matched the watch level filter, an error occurs.

For watches without a watch level filter and content that matches the group level filter, the output is correct.

Now I understand that the group level filter is a pre-filter for watches in a group, I would expect the behaviour for watches with the same filter to be to error - the watch level filter applies to the output of the group level filter - which in my CD example above would result in the group filter output being "0.45.3" and then the watch filter erroring.

Also, the UI needs some extra text informing the use of the filter (and notifocation) hierarchy at the watch, group, and system level.

jsnfwlr avatar Oct 08 '23 22:10 jsnfwlr

For watches with a watch level filter and content that failed the group level filter, but would have matched the watch level filter, an error occurs.

I think this is correct, because that's how the filter would have worked in any case without the group

For watches with a watch level filter and content that matches the group level filter and the watch level filter, the output is duplicated.

Can be fixed

dgtlmoon avatar Feb 02 '24 08:02 dgtlmoon