-
Type: Bug Report
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.2.2-B3
-
Component/s: Data Management
-
Labels:None
-
Change Log Group:Fixed
-
Change Log Message:Time in date range filters is recognized
-
Story Points:1
-
Copy Issue Key:
-
Patch Instructions:
- in "\kDateFormatter::Parse" method: - 0.2h
- add optional (defaults to "null") $format parameter
- when $format parameter isn't specified (existing code), then take it's value from "input_format" field option
- in "\kSearchHelper::_getInputTimeFormat" method: - 0.3h
- add optional (defaults to "input_time_format") "$format_option_name" parameter
- in call sites (found 1 place) specify "input_time_format" as 2nd parameter value
- use str_replace/ucwords function combo to create "$lang_current" object field name from "$format_option_name" parameter value
- in "\kSearchHelper::processRangeField" method: - 1h
- add optional (default to "") $format_option_prefix parameter
- when time is missing, then always add time for "00:00:00" instead of dynamically getting time based on field type
- when calling "\kSearchHelper::_getInputTimeFormat" method instead of "input_time_format" specify $format_option_prefix . 'time_format'
- before calling "$formatter->Parse":
- set "$format" variable (new) to the $options[$format_option_prefix . 'format'] value
- specify $format variable as $format argument of "\kDateFormatter::Parse" method call
- if there was an error during date parsing and $format_option_prefix parameter is empty, then instead of returning "false" return result of calling "\kSearchHelper::processRangeField" method with same parameters, except that $format_option_prefix argument would be set to "input_"
- in "\kSearchHelper::getCustomFilterSearchClause" method, when handling "date_range" filter type: - 0.5h
- do the from/to guessing when either of them is specified ONLY, when time is absent in specified date
- when $to is specified, but missing a time, then add 23:59:59 time to it
- if only $from/$to is specified and it has time in it, then instead of date range filter to exact match ignoring seconds (because display format is missing seconds, but in DB we still record them)
- confirm that: - 0.5h
- specifying one of from/to date only (no time) it works as before: range filter for given day
- specifying one of from/to date with time it works by showing all records with that time (ignoring seconds)
- specifying both from & to dates with time would show exactly that range of dates (ignoring seconds)
- date & time entered in both output & input formats are recognized
- review connected task comments & commit
- implemented in
-
[Diffusion] rINP16669 Fixes INP-1746 - Correct time parsing in date range filter
-
D346 INP-1746 Correct time parsing in date range filter
- mentioned in
-
Page Loading...