Sort by Duration doesn't seem to work...

Support and queries relating to all previous versions of ZoneMinder
Locked
User avatar
lazyleopard
Posts: 403
Joined: Tue Mar 02, 2004 6:12 pm
Location: Gloucestershire, UK

Sort by Duration doesn't seem to work...

Post by lazyleopard »

I'm now using sort by Frames rather than sort by Duration, as I just noticed the latter doesn't seem to do what I expect, but seems to sort by date/time instead. (Using 1.19.3)
Rick Hewett
User avatar
fernando
Posts: 240
Joined: Thu Jul 10, 2003 6:00 pm

Post by fernando »

mmm works fine for me.
Fernando
User avatar
lazyleopard
Posts: 403
Joined: Tue Mar 02, 2004 6:12 pm
Location: Gloucestershire, UK

Post by lazyleopard »

Which version are you using?

Select a list of events (sorted by default Date/Time)

Code: Select all

Id    Name      Monitor    Time(v)  Duration Frames Alarm Frames Total Score Avg. Score Max. Score Mark 
30344 Event-30344 Door 06/25 11:43:29 12.61 58 37 3478 94 168
30340 Event-30340 Door 06/25 11:38:03  0.70 24 3 3 1 1
30338 Event-30338 Door 06/25 11:30:57  3.16 31 10 1143 114 158
30333 Event-30333 Door 06/25 11:21:05  1.40 26 5 342 68 116
30322 Event-30322 Door 06/25 11:10:33  3.16 31 10 753 75 129
Change to "Duration" and hit "Select"

Code: Select all

Id    Name      Monitor    Time     Duration Frames Alarm Frames Total Score Avg. Score Max. Score Mark
30344 Event-30344 Door 06/25 11:43:29 12.61 58 37 3478 94 168 
30340 Event-30340 Door 06/25 11:38:03  0.70 24 3 3 1 1 
30338 Event-30338 Door 06/25 11:30:57  3.16 31 10 1143 114 158 
30333 Event-30333 Door 06/25 11:21:05  1.40 26 5 342 68 116 
30322 Event-30322 Door 06/25 11:10:33  3.16 31 10 753 75 129
Change to "Frames" and hit "Select"

Code: Select all

Id    Name      Monitor    Time    Duration Frames(v) Alarm Frames Total Score Avg. Score Max. Score Mark
29419 Event-29419 Door 06/24 13:53:40 19.27 77 45 3554 78 163
30206 Event-30206 Door 06/25 09:33:32 12.97 59 32 2251 70 122
30344 Event-30344 Door 06/25 11:43:29 12.61 58 37 3478 94 168
30207 Event-30207 Door 06/25 09:33:51 11.21 54 31 2777 89 140
30259 Event-30259 Door 06/25 10:04:30  5.60 38 10 1111 111 149
Rick Hewett
djsb
Posts: 53
Joined: Mon Apr 05, 2004 2:50 am

Post by djsb »

works fine in here... version 1.19.3
User avatar
lazyleopard
Posts: 403
Joined: Tue Mar 02, 2004 6:12 pm
Location: Gloucestershire, UK

Post by lazyleopard »

Weird...

Also puzzling...

'cos it very definitely is not working here with 1.19.3.

So I wonder what's broken...
Rick Hewett
User avatar
lazyleopard
Posts: 403
Joined: Tue Mar 02, 2004 6:12 pm
Location: Gloucestershire, UK

Post by lazyleopard »

Ok... Further investigation reveals:

1) If I select "Duration" from the drop-down in the "Sort by" part of the "Filter" window, and then hit "Submit" in the same window, the events end up sorted in the default order.

2) If I click on the "Duration" title in the "Events" list window then the sort happens as expected.

:roll:
Rick Hewett
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

It sounds like there is a problem here. I'll take a look at it.

Phil,
User avatar
lazyleopard
Posts: 403
Joined: Tue Mar 02, 2004 6:12 pm
Location: Gloucestershire, UK

Post by lazyleopard »

Could always be something daft like a patch not quite taken or a database not quite updated correctly, but if there is a general problem then it's connected with the filter window....
Rick Hewett
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I've had a look at this now and have found the problem. It's fixed in the main development tree now but if you want to patch your own installation the easiest thing to do is edit zm_funcs.php, then go to line 450 or so and look for the line

case 'Secs' :
$sort_column = "E.Length";
break;


and add an extra line so it now appears thus

case 'Secs' :
case 'Length' :
$sort_column = "E.Length";
break;


then save and exit.

Phil,
User avatar
lazyleopard
Posts: 403
Joined: Tue Mar 02, 2004 6:12 pm
Location: Gloucestershire, UK

Post by lazyleopard »

Cheers. Works a treat now. ;)
Rick Hewett
Locked