Menu

#125 ScanCode vs.Timespan collision detection

Reproducible
open
Co Ho
6
2002-01-29
2002-01-29
Co Ho
No

The time span overlapping detection algorithm would
not work if the user manually scan in different
ScanActivityCode for each back-to-back session.

SQL code to find the bug...
select * from TKUsage where SiteNo = 101 and ClockIn
> '01/24/02' and ClockIn < '01/25/02' and
PIDM='00466887' order by RecID, SeqNo

Will produce...

14E5B0C5234CA13C120C49BE9BA6D591 0 101
00466887 020433 2002-01-24
07:58:00 2002-01-24 07:59:00 Original usage
1 2002-01-27 01:02:00
14E5B0C5234CA13C120C49BE9BA6D591 1 101
00466887 020433 2002-01-24
07:58:00 2002-01-24 07:59:00 INVALIDATED
-1 2002-01-27 01:02:00
14E5B0C5234CA13C120C49BE9BA6D591 2 101
00466887 020433 2002-01-24
07:58:00 2002-01-24 08:13:00 Promote to
minimum usage of 15 minutes 15 2002-01-27
01:02:00
7D96A4835A8ADC57EB51FEDDEAD50557 0 101
00466887 000000 2002-01-24
07:57:00 2002-01-24 07:58:00 Original usage
1 2002-01-27 01:02:00
7D96A4835A8ADC57EB51FEDDEAD50557 1 101
00466887 000000 2002-01-24
07:57:00 2002-01-24 07:58:00 INVALIDATED
-1 2002-01-27 01:02:00
7D96A4835A8ADC57EB51FEDDEAD50557 2 101
00466887 000000 2002-01-24
07:57:00 2002-01-24 08:12:00 Promote to
minimum usage of 15 minutes 15 2002-01-27
01:02:00

Notice that the user clockin first with 000000 then
changed their mind and clock in again with 020433
activity code.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB