major
minor
major
minor
minor
#25732
Model-based search: Input validation: Filter query leads to NullpointerException
If a date filter is defined for a range, a NullPointerException may occur.
**Reproduction in TLDemo:**\\ Model-based search.\\ Search for ="Demo A" -> Filter = "date" -> Comparison = "is within the range" -> Date from = "1/1/21" -> Date to = "2/2/21"\\ Refresh.\\ Result: NpEx.
**Cause:**\\ After selecting the Comparison field = "is within the range," this field was reinitialized with new value options "between" and "not between," but neither option was selected. Additionally, the field is not marked as required, so it is not apparent that this selection must be made manually.
In other words, the correct structure is as follows:\\ Search for ="Demo A" -> Filter = "date" -> Comparison = "is within range" -> **''Comparison'' = "between"** -> Date from = "1/1/21" -> Date to = "2/2/21"\\ At the very least, the "Comparison" field should be made required, because this input is guaranteed to be overlooked.
Test
- /com.top_logic.demo/src/test/java/test/com/top_logic/demo/scripted/search/Ticket25732DateRangeSearch.script.xml