Fixed #13300 Custom Asset Report, Checkout date range never includes current day #13309
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
We had a problem with the Custom Asset report in the
Checkout Range
, as we stored thelast_checkout
field as a DATETIME, when we made a Checkout Range for example from '2023/07/01' to '2023/07/13', if the checkout was today at this moment we got into the database field for example '2023/07/13 16:06:23', which is out of the dates range because of the 'extra' time we are storing.So I add a cast of the type date to the
last_checkout
column in the query, so the report can ignore that time part of the DATETIME type and the results are retrieved correctly. I also include in the fixcreated_at
andlast_audit_date
which probably have the same problem.Fixes #13300
Type of change
How Has This Been Tested?
Test Configuration: