Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRYD-1259: Fix repeated search panel requests when login has expired. #187

Merged
merged 1 commit into from
Aug 8, 2023

Conversation

ray-lee
Copy link
Member

@ray-lee ray-lee commented Aug 8, 2023

What does this do?

This correctly connects the searchError prop of the SearchPanel component to state from the Redux store. Previously, searchError was not being set, even though it was needed for proper functioning of the SearchPanel. It also tweaks the conditions under which SearchPanel executes a new search.

Why are we doing this? (with JIRA link)

This fixes a bug where the SearchPanel would issue a new search whenever a search resulted in an error. When the error was a 401 due to not being logged in, this would cause an endless loop of searches.

JIRA: https://collectionspace.atlassian.net/browse/DRYD-1259

How should this be tested? Do these changes have associated tests?

  • Log in using the UI
  • Do a keyword search on a record type
  • Open the Network panel in the developer tools
  • Restart tomcat, so that all active tokens are invalidated
  • In the UI, select a different record type in the keyword search box, and click the search button

Expect: A single request is made to populate the Reports sidebar, and another single request is made to populate the Data Updates (batch) sidebar. The requests should return 401 errors. The requests should not be repeated after the 401 errors.

Dependencies for merging? Releasing to production?

None.

Has the application documentation been updated for these changes?

n/a

Did someone actually run this code to verify it works?

@ray-lee ran this locally.

@codecov
Copy link

codecov bot commented Aug 8, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (5baa689) 96.58% compared to head (0cffa48) 96.58%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #187   +/-   ##
=======================================
  Coverage   96.58%   96.58%           
=======================================
  Files         550      550           
  Lines       10936    10936           
  Branches     1226     1226           
=======================================
  Hits        10563    10563           
  Misses         38       38           
  Partials      335      335           
Files Changed Coverage Δ
src/components/search/SearchPanel.jsx 93.54% <ø> (ø)
src/containers/search/SearchPanelContainer.js 100.00% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ray-lee ray-lee merged commit 280a1e7 into collectionspace:master Aug 8, 2023
3 checks passed
@ray-lee ray-lee deleted the bugfix/search-panel-loop branch August 8, 2023 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant