The Make API doesn't actually delete records, it marks them with a deletedAt timestamp. I just realized that the search API will return deleted makes. The server can add in a filter on all searches to ensures deleted Makes do not show in results.
Although, Admins might want to override that... hmm.
Note: we should likely actually delete makes, assuming the UI for users is actually "delete". There are possible privacy issues otherwise, and we may some day be legally bound to do such deletions. (AKA: Why does the make API not actually delete records?)
When I started on the code base, it's how it was originally set up. Not sure why the decision was originally made to soft-delete records, but it's an easy fix to permanently remove them.
:wex - what are your thoughts on moving to an actual delete of make records?
David is right from a data retention perspective. I hate not having the ability to undo a delete though. :davida, if we did a hard delete for all Makes deleted over X days ago, would that satisfy your assertion?
Sure -- alternatively, have "Move to trash" and "Empty trash".
:cade I like a combination of these ^. I don't think this is a requirement for June, but could you create (a) bug(s) for that feature? - hard delete everything that was deleted 14 days earlier (daily task) - make sure that you can update a make's deletedAt field to null (this is how we do undo delete) - make sure those with permission (creator of make & admins) can view deleted makes - figure out how to hard delete through the API The admin UI and webmaker UI will then be able to "view trash", "restore from trash" and "empty trash"
(In reply to Simon C. Wex from comment #7) > - hard delete everything that was deleted 14 days earlier (daily task) Filed Bug #867982 > - make sure that you can update a make's deletedAt field to null (this is > how we do undo delete) Filed Bug #867986 > - make sure those with permission (creator of make & admins) can view > deleted makes This can be taken care of with this ticket. > - figure out how to hard delete through the API I'll expose this while working on Bug #867982
Created attachment 746942 [details] [review] https://github.com/mozilla/MakeAPI/pull/50 I've modified the search so that it will always apply a filter for the deletedAt field. I'll build on top of this in the other Delete related bugs.
Comment on attachment 746942 [details] [review] https://github.com/mozilla/MakeAPI/pull/50 Code is good. R+
Attachment #746942 - Flags: review?(schranz.m) → review+
Commit pushed to master at https://github.com/mozilla/MakeAPI https://github.com/mozilla/MakeAPI/commit/27f0955097d5d141576d831cfa7453368a9fe5dc Fix Bug 867710 - filter out deleted projects
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Attachment mime type: text/plain → text/x-github-pull-request
You need to log in before you can comment on or make changes to this bug.