Resolve "Refine display of constraints in advanced search form" #3751
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
This MR excludes search fields included in the advanced search form from the constraints displayed on the advanced search page. The advanced search already populates the form search field controls with their respective field values. Preventing these fields from displaying in the constraints eliminates duplication and ensures there is no discrepancy between the constraints and the populated search values if the user goes on to edit them. The advanced search already excludes its filter fields from the constraints. These changes ensure that the advanced search treats the search fields in the same way.
Screenshots
path with incoming parameters:
/catalog/advanced?op=must&clause[0][field]=all_fields&clause[0][query]=&clause[1][field]=title&clause[1][query]=medicine&clause[2][field]=author&clause[2][query]=&clause[3][field]=subject&clause[3][query]=&f_inclusive[format][]=Book&sort=relevance&commit=SearchCurrent behavior:
The advanced search includes the Title query "medicine" in the constraints, but excludes the format filter "Book". It populates the form with the expected values.
MR behavior:
The advanced search excludes both the Title query and the inclusive format filter from the constraints. It populates the form with the expected values.
closes #3301