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

Allow deletion of saved searches #9317

Closed
philippconzett opened this issue Jan 24, 2023 · 4 comments · Fixed by #10198
Closed

Allow deletion of saved searches #9317

philippconzett opened this issue Jan 24, 2023 · 4 comments · Fixed by #10198
Labels
Feature: Metadata Type: Feature a feature request User Role: Curator Curates and reviews datasets, manages permissions
Milestone

Comments

@philippconzett
Copy link
Contributor

philippconzett commented Jan 24, 2023

Overview of the Feature Request
Dataset links between collection within a Dataverse installation can be removed using this API call:

curl -H "X-Dataverse-key: $API_TOKEN" -X DELETE http://$SERVER/api/dataverses/$linked-dataverse-alias/deleteLink/$linking-dataverse-alias

However, the links will still appear again since the saved searches will be re-established weekly.
To remove links permanently, we need a DELETE endpoint for saved searches.

What kind of user is the feature intended for?
API User

What inspired the request?
A long-lasting issue we have been having at DataverseNO; see this discussion thread in the Dataverse Google group.

What existing behavior do you want changed?
Dataset links between sub-collections within a Dataverse installation being re-established after unlinking.

Any brand new behavior do you want to add to Dataverse?
No.

Any related open or closed issues to this feature request?
#1364. See also @pdurbin's comment in the mentioned discussion thread:

From a quick look at the code, it seems that the ability to delete saved searches was stubbed out but never implemented: https://github.com/IQSS/dataverse/blob/v5.12.1/src/main/java/edu/harvard/iq/dataverse/api/SavedSearches.java#L174

The docs you found explain the thinking back then:

"There is a known issue (#1364) that once a link to a Dataverse collection or dataset is created, it cannot be removed (apart from database manipulation and reindexing) which is why a DELETE endpoint for saved searches is neither documented nor functional"

These days, as you know, deleting links is supported, so it's probably time to make that "delete saved search" API endpoint real.

@pdurbin pdurbin changed the title Feature Request/Idea: Enable deleting saved searches Allow deletion of saved searches Oct 8, 2023
@pdurbin pdurbin added Type: Feature a feature request Feature: Metadata User Role: Curator Curates and reviews datasets, manages permissions labels Oct 8, 2023
@luddaniel
Copy link
Contributor

@pdurbin @philippconzett Do you think that we need to remove links created by the saved search while removing a saved search ? This means, making sure that we don't remove links that would be created by another saved search.
Otherwise, links to datasets and dataverses would need to be removed by hand...

@pdurbin
Copy link
Member

pdurbin commented Dec 13, 2023

I'm curious what @philippconzett thinks but yes, I think it would be nice if deleting a saved search automatically deleted any links created by that saved search. However, as you point out, it could be tricky to determine how the link was created, by a saved search or not.

We do have the ability to delete links now, thanks to #4543. We call this "unlinking": https://guides.dataverse.org/en/6.1/admin/dataverses-datasets.html#unlink-a-dataset

@philippconzett
Copy link
Contributor Author

Thanks. I'm not sure. The most important thing for us is that the new feature will allow us to permanently delete any linking between datasets and collections. Will the delete saved searches be an API command similar to the one I now need to run each Sunday (= curl -H "X-Dataverse-key: $API_TOKEN" -X DELETE http://$SERVER/api/datasets/$linked-dataset-id/deleteLink/$linking-dataverse-alias)?

luddaniel added a commit to Recherche-Data-Gouv/dataverse that referenced this issue Dec 20, 2023
luddaniel added a commit to Recherche-Data-Gouv/dataverse that referenced this issue Dec 20, 2023
luddaniel added a commit to Recherche-Data-Gouv/dataverse that referenced this issue Dec 20, 2023
@pdurbin
Copy link
Member

pdurbin commented Jan 5, 2024

@luddaniel created a pull request:

Thanks!

luddaniel added a commit to Recherche-Data-Gouv/dataverse that referenced this issue Jan 31, 2024
luddaniel added a commit to Recherche-Data-Gouv/dataverse that referenced this issue Jan 31, 2024
luddaniel added a commit to Recherche-Data-Gouv/dataverse that referenced this issue Mar 6, 2024
@pdurbin pdurbin added this to the 6.4 milestone Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Metadata Type: Feature a feature request User Role: Curator Curates and reviews datasets, manages permissions
Projects
Status: Interested
Status: High priority
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants