Enhancement
Major
Detail
Bugfix
Detail
Detail
#25732
Model-based search: Input validation: Filter query leads to NullpointerException
If a date filter is defined on a range, a NullpointerException may occur.
**Repro in TLDemo:**\ Model based search.\\ Search for="Demo A" -> Filter = "date" -> Comparison = "is in range" -> Date from = "1.1.21" -> Date to = "2.2.21"\\ Update.\\ Result: NpEx.
**Cause:**\ After selecting the field Comparison = "is in range", this field was reinitialized with new value options "between" and "not between", but neither option was selected. Likewise, the field is not marked as mandatory, so it is not apparent that this selection must be made manually.
I.e. the correct structure looks like this:\ Search for="Demo A" -> Filter = "date" -> Comparison = "is in range" -> **''Comparison'' = "between "** -> Date from = "1.1.21" -> Date to = "2.2.21"\ At least the Comparison field would have to become a mandatory field, because this input is guaranteed to be forgotten.
Test
- /com.top_logic.demo/src/test/java/test/com/top_logic/demo/scripted/search/Ticket25732DateRangeSearch.script.xml