core-geonetwork icon indicating copy to clipboard operation
core-geonetwork copied to clipboard

My metadata filter in editor board not working properly after certain actions like importing a metadata

Open josegar74 opened this issue 4 years ago • 0 comments

Test case:

  1. In the editor dashboard check Only my records and click search --> A request is sent to filter the metadata (OK)
  2. In the editor dashboard, select to import a metadata
  3. Return to the editor dashboard
  4. Check Only my records and click search --> No request done (NO OK)
  5. Click search again --> The request is done (OK)
  6. Clean the filter and check Only my records and click search --> No request done (NO OK)
  7. Click search again --> The request is done (OK)

Seem related to this code:

https://github.com/geonetwork/core-geonetwork/blob/eba7f19d6ca9325ef06c71a8bbc1a8e9420883b5/web-ui/src/main/resources/catalog/components/search/searchmanager/SearchFormDirective.js#L315

For some reason the new url with the owner filter matches the previous url that didn't have that option selected, maybe the parameter is added in the backend.

@fxprunayre the problem seem related to this change https://github.com/geonetwork/core-geonetwork/commit/795295a66509af3dfe06b52af596dbb11a691625

In the dashboard, never enters this code, so the lastSearchUrl is not updated, causing the issue described, but I don't really get clear the check !that.isSearch(state.current.path)

https://github.com/geonetwork/core-geonetwork/blob/eba7f19d6ca9325ef06c71a8bbc1a8e9420883b5/web-ui/src/main/resources/catalog/components/search/searchmanager/LocationService.js#L192-L195

josegar74 avatar Oct 29 '20 10:10 josegar74