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

Forum for questions and support relating to 1.35.x development only.
Post Reply
taborj
Posts: 1
Joined: Fri Apr 10, 2020 5:35 pm

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

Post by taborj » Fri Apr 10, 2020 5:45 pm

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_2020-04-10_10-43-00.png
Screenshot of filter
Screenshot_2020-04-10_10-43-00.png (53.69 KiB) Viewed 654 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: 1325
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

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

Post by iconnor » Fri Apr 10, 2020 9:35 pm

maybe the -3 is screwing it up. -3 what? I'm not sure it will assume days.

rockedge
Posts: 1154
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA
Contact:

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

Post by rockedge » Sat Apr 25, 2020 9:55 pm

end date condition needs to more specific. -3 hour or -3 day otherwise what is the date - time comparing too?

mikb
Posts: 476
Joined: Mon Mar 25, 2013 12:34 pm

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

Post by mikb » Sun Apr 26, 2020 5:40 pm

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: 10
Joined: Mon Feb 11, 2019 5:23 pm

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

Post by mfitch » Sun Apr 26, 2020 5:58 pm

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

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests