Commit c3a1086
TUL/fix: default filter operator to 'equals' for operator-less URLs (#781)
A search URL whose filter carries no operator (e.g. a legacy or crawled
"/search?f.subject=foo" instead of "f.subject=foo,equals") was forwarded to the
backend verbatim. The backend correctly rejects the operator-less filter with
HTTP 422 per the DSpace REST Contract, producing an error on every affected
search render (dataquest-dev/dspace-customers#781).
When reading active filters from the URL in SearchConfigurationService.
getCurrentFilters, default the operator to 'equals' (mirroring the existing
range-filter branch). Values that already embed an operator - i.e. contain a
comma - are left untouched by SearchOptions.toRestUrl, so explicit operators
(equals/notequals/contains/authority/...) are preserved. Operator-less legacy
URLs now resolve to "<value>,equals" and return results instead of 422.
Updated the getCurrentFilters expectations in the SearchConfigurationService
and MyDSpaceConfigurationService specs accordingly.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 5e1de44 commit c3a1086
3 files changed
Lines changed: 7 additions & 3 deletions
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
200 | 204 | | |
201 | 205 | | |
202 | 206 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
0 commit comments