core-geonetwork
core-geonetwork copied to clipboard
My metadata filter in editor board not working properly after certain actions like importing a metadata
Test case:
- In the editor dashboard check Only my records and click search --> A request is sent to filter the metadata (OK)
- In the editor dashboard, select to import a metadata
- Return to the editor dashboard
- Check Only my records and click search --> No request done (NO OK)
- Click search again --> The request is done (OK)
- Clean the filter and check Only my records and click search --> No request done (NO OK)
- 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