This fixes a bug in the get_cmds query logic which resulted in missing commands from the query under somewhat unusual circumstances:
Query start is between 30 to 44 days before current time
Within that window there is a non-load command from a Command Event.
Query start is later than that non-load command time + 3 days.
The basic problem is that the code was checking for the first command of any type in the recent commands. Instead it should have been checking for the first load command in recent commands (within 30 days).
The unit test demonstrates the problem as it applies for a current date of 2022:352. In this case the OORMPEN non-load command at 2022:312:03:09:55.000 causes the problem.
Interface impacts
None
Testing
Added unit test which failed prior to the fix and passes now.
Description
This fixes a bug in the
get_cmds
query logic which resulted in missing commands from the query under somewhat unusual circumstances:The basic problem is that the code was checking for the first command of any type in the recent commands. Instead it should have been checking for the first load command in recent commands (within 30 days).
The unit test demonstrates the problem as it applies for a current date of 2022:352. In this case the OORMPEN non-load command at 2022:312:03:09:55.000 causes the problem.
Interface impacts
None
Testing
Added unit test which failed prior to the fix and passes now.
Unit tests
Independent check of unit tests by Jean
Functional tests
No functional testing.