Feature #3900

[Workbench] Trash button on collection uses "delete" API instead of setting expires_at/trash_at

Added by Tom Clegg almost 5 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Start date:
02/10/2017
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
1.0

Description

The trash button for collections in Workbench should use the collections/delete API instead of changing owner_uuid to current_user.uuid (aka "home project"). The collection will then be wiped from the current listing, as the trash button does now, because trashed collections do not appear in collection listings.

See Expiring collections


Subtasks

Task #11044: Review 3900-trash-collections-delete-apiResolvedRadhika Chippada


Related issues

Related to Arvados - Story #3411: [API] Implement Trash behavior using collection expirationResolved07/29/2014

Related to Arvados - Story #9278: [Crunch2] Document/fix handling of collections with non-nil expires_at fieldIn Progress06/01/2016

Copied to Arvados - Story #9592: [FUSE] rmdir on CollectionDirectory sets expires_atNew07/13/2016

Associated revisions

Revision d3719c6b
Added by Lucas Di Pentima over 2 years ago

Merge branch '3900-trash-collections-delete-api'
Closes #3900

History

#1 Updated by Brett Smith about 3 years ago

  • Subject changed from [Workbench] Trash button on collection sets expiry time to now+trash_ttl (see #3411), trashed collections are hidden unless "show trashed collections" checkbox is checked to [Workbench] Trash button on collection sets expires_at
  • Description updated (diff)

#2 Updated by Brett Smith about 3 years ago

  • Assigned To set to Brett Smith
  • Story points deleted (2.5)

#3 Updated by Tom Clegg almost 3 years ago

  • Description updated (diff)

#4 Updated by Tom Clegg almost 3 years ago

  • Description updated (diff)

#5 Updated by Tom Morris almost 3 years ago

  • Assigned To changed from Brett Smith to Tom Morris

#6 Updated by Tom Morris over 2 years ago

  • Assigned To deleted (Tom Morris)

#7 Updated by Tom Clegg over 2 years ago

  • Description updated (diff)

#8 Updated by Tom Clegg over 2 years ago

  • Description updated (diff)

#9 Updated by Tom Morris over 2 years ago

  • Target version changed from Arvados Future Sprints to 2017-02-15 sprint
  • Story points set to 1.0

#10 Updated by Lucas Di Pentima over 2 years ago

  • Assigned To set to Lucas Di Pentima

#11 Updated by Lucas Di Pentima over 2 years ago

  • Status changed from New to In Progress

#12 Updated by Tom Clegg over 2 years ago

  • Subject changed from [Workbench] Trash button on collection sets expires_at to [Workbench] Trash button on collection uses "delete" API instead of setting expires_at/trash_at

#13 Updated by Lucas Di Pentima over 2 years ago

Branch 3900-trash-collections-delete-api at 108467e
Test run: https://ci.curoverse.com/job/developer-run-tests/158/

Changed projects controller to call destroy method on every item removed. When removing a collection, also reparent it to the home project so that the project can be eventually deleted.

#14 Updated by Lucas Di Pentima over 2 years ago

Updates: 4dbaf8c
Test run: https://ci.curoverse.com/job/developer-run-tests/159/

Reverted changes so that Workbench make a delete API call on collection removal only, as there are explicit functional tests that check for other objects inside projects to be moved to the Home project when removed.

Although TomC said to me that WB should ask for API delete method on any object being removed from a project regardless its type, the fact that there are tests confirming that non-collection objects should be moved instead of deleted make me think this is out of scope for this ticket and not a simple change.

#15 Updated by Radhika Chippada over 2 years ago

  • In the following, you might want to invoke "item.destroy" before updating "@removed_uuids" just for semantics
             @removed_uuids << item.uuid
    +        item.destroy
    

LGTM

#16 Updated by Lucas Di Pentima over 2 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Applied in changeset arvados|commit:d3719c6ba29daec66eb1dd4003f2580f97da8e41.

Also available in: Atom PDF