relis
relis copied to clipboard
Deleting all papers keeps them in the DB
Describe the bug I imported 166 references. I deleted them all. They do not show in the application. Now I try to add a new paper manually by doing
- Go to the Project homepage (my project is Language Composition)
- Click on Papers > All
- Click on Add new
- In the Authors field, I see all the authors of the deleted papers
I checked in the database: select * from paper select * from paperauthor select * from author
All the data is actually still there.
Expected behavior All the papers and authors of deleted papers should be deleted from the database.
Desktop (please complete the following information):
- OS: Windows 7
- Browser: Firefox
Before deleting record was done by just changing the status of the record that's why papers were kept in the DB. I changed for this operation and used the SQL Query DELETE instead of UPDATE that was used before
So this brings another issue.
The previous behavior was that when you delete a paper, it only changed the status. This is useful if we can undo a delete. But I think when you click Delete all papers, it says this cannot be undone. It is also useful because what if the paper has some records associated with it (like a exclusion criteria, classification, etc.)? Can you delete a paper that has a classification?
If you revert back to the original behavior, then all you need to do is add a filter in the Author field of the Add new Paper form to only show Authors of paper with status "not deleted". Same for the Venues field.
What do you think is the best behavior?
As the goal of this feature is to delete all papers, it is like restarting the project. It deletes everything except configurations: authors, screening values, QA and classifcation are also deleted.
So, yes we can also delete a paper that has a classiction, it also delete the classification.
I delete all papers. In the database, all venues and all authors are still there. The only way to have a clean project is to manually query the database and execute: "delete from author" and "delete from venue"