Actions
Idea #3150
closed[API] Add "trash" behavior for all object types, instead of literal rdbms "delete"
Status:
Rejected
Priority:
Normal
Assigned To:
-
Category:
Workbench
Target version:
-
Start date:
07/04/2014
Due date:
Story points:
2.0
Description
"Trash" button should make an object disappear from the current view, but it should be possible (ideally easy) to get it back.
API server behavior
Notes:- Jobs in particular, and probably all objects, should never be deleted outright during normal use -- just moved out of the way. (The exception is the underlying data blocks referenced by deleted collections.)
- Add a "expires_at" flag to each model (just like collections have now).
- Feature: an expired/deleted object's UUID cannot be reused by a different object.
- By default, do not return rows with
expires_at is not null and expires_at < CURRENT_TIMESTAMP
- Trash lifetime is set in
Rails.application.config.default_trash_lifetime
(default: two weeks) - application controller method
delete(optional_ts=nil)
→ set expires_at to optional_ts (if nil, useTime.now + Rails.application.config.default_trash_lifetime
)
- If I delete an object from a project that is shared with other users, other users can still read it by looking at the project's "trash" view
- Recursive delete would be slow, and awkward to undo. (Which contents were already in the trash before the project was trashed?)
- Skip trashed projects in site-wide search (like
collections.index
, andgroups.contents
with no group_uuid).
- Trash button → invoke DELETE method on API server
- Empty trash → invoke
/:object/:uuid/delete/{Time.now}
on each object in the user's trash
SDK
The default SDK view should be to hide items in the trash, to make SDK results consistent with those seen in Workbench. But the user should be able to override this setting to view items in the trash.
Possible solution: a show_trash
option (defaults to False) to the list
, update
, show
and other methods.
Updated by Radhika Chippada over 10 years ago
- Subject changed from Specify "Trash" behavior and design implementation to [Workbench] Specify "Trash" behavior and design implementation
- Category set to Workbench
Updated by Tom Clegg over 10 years ago
- Subject changed from [Workbench] Specify "Trash" behavior and design implementation to [Workbench] Improve "Trash" behavior in Workbench
It should be possible (and easy) to trash and then un-trash
- collections
- jobs, pipelines, etc.
- projects with stuff in them
- collections
- jobs
Updated by Tom Clegg over 10 years ago
- Target version changed from 2014-08-06 Sprint to Arvados Future Sprints
Updated by Tom Clegg about 10 years ago
- Subject changed from [Workbench] Improve "Trash" behavior in Workbench to [API] Add "trash" behavior for all object types, in lieu of "delete"
Updated by Tom Clegg about 10 years ago
- Subject changed from [API] Add "trash" behavior for all object types, in lieu of "delete" to [API] Add "trash" behavior for all object types, instead of literal rdbms "delete"
Updated by Tom Clegg almost 8 years ago
- Target version deleted (
Arvados Future Sprints)
Actions