Page 1 of 1

Filter - odd behavior with "and" and "or"

Posted: Fri Apr 10, 2020 5:45 pm
by taborj
EDIT: Okay, the behavior is slightly different than I thought; see the bottom of this post for my observations.

I'm finding a strange situation with one of my filters.

I've built one to purge out events that are older the 3 days, and have a total score less than or equal to 19. If I set the filter to use "and" on both of those, it acts like an "or"; in other words, it deletes events that are older than 3 days OR with a total score less than or equal to 19.

If I set the filter to "or", it acts like an "and" and works how I'd like it to (i.e. deletes events older than 3 days that also have a score less than or equal to 19).

Interestingly, it only seems to be affecting this one filter; the standard Purge filter seems to work properly.

Any ideas? Perhaps I built this incorrectly?
Screenshot of filter
Screenshot of filter
Screenshot_2020-04-10_10-43-00.png (53.69 KiB) Viewed 3694 times

UPDATE: Okay, so setting it to OR doesn't do what I want; it only gives me items that are the right age, but includes items with a higher total score. But setting it to "and" gives me items of the right score, but are newer than I want. I definitely think I've messed this filter up somehow, I just don't know how.

Re: Filter - odd behavior with "and" and "or"

Posted: Fri Apr 10, 2020 9:35 pm
by iconnor
maybe the -3 is screwing it up. -3 what? I'm not sure it will assume days.

Re: Filter - odd behavior with "and" and "or"

Posted: Sat Apr 25, 2020 9:55 pm
by rockedge
end date condition needs to more specific. -3 hour or -3 day otherwise what is the date - time comparing too?

Re: Filter - odd behavior with "and" and "or"

Posted: Sun Apr 26, 2020 5:40 pm
by mikb
Expect nothing, then you won't be disappointed.

However, I might expect a bald "-3" of a timestamp in Unix to mean 3 seconds before epoch (i.e. Wed Dec 31 23:59:57 GMT 1969)

This relates to events from before ZM existed :)

Re: Filter - odd behavior with "and" and "or"

Posted: Sun Apr 26, 2020 5:58 pm
by mfitch
When I created my filters based on relative time, I found this documentation page incredibly helpful: https://zoneminder.readthedocs.io/en/la ... te-strings. In addition to other criteria, my relative line worked out to be:
End Date/Time
greater than or equal to
11 minutes ago
and then I had
Limit to first 1 results only