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

Previous development branch now released as 1.36
Locked
taborj
Posts: 1
Joined: Fri Apr 10, 2020 5:35 pm

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

Post 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 2922 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.
User avatar
iconnor
Posts: 2881
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

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

Post by iconnor »

maybe the -3 is screwing it up. -3 what? I'm not sure it will assume days.
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

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

Post by rockedge »

end date condition needs to more specific. -3 hour or -3 day otherwise what is the date - time comparing too?
mikb
Posts: 586
Joined: Mon Mar 25, 2013 12:34 pm

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

Post 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 :)
mfitch
Posts: 17
Joined: Mon Feb 11, 2019 5:23 pm

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

Post 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
Locked