Ignore AppConfig[:limit_csv_fields] unless the params[:dt] == 'csv' #3156
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.
Ignore the
AppConfig[:limit_csv_fields]
value unless the request type iscsv
Description
The
AppConfig[:limit_csv_fields]
property causes the Search model to ignore thefields
parameter. This causes all fields to be returned from the query. TheAppConfig[:limit_csv_fields]
should limit the fields returned by the search only whendt=xml
. This change allows a JSON search to limit the number of fields returned when the app is configured withAppConfig[:limit_csv_fields] = false
.Related JIRA Ticket or GitHub Issue
https://archivesspace.atlassian.net/browse/ANW-1975
How Has This Been Tested?
I added four tests to
model_search_test.rb
to ensure that thefl
parameter is sent to SOLR appropriately based onAppConfig[:limit_csv_fields]
and thedt
parameter.Screenshots (if appropriate):
n/a
Types of changes
Checklist: