Story #3821

[Workbench] Delete and rename files in collections

Added by Peter Amstutz almost 3 years ago. Updated 3 months ago.

Status:ResolvedStart date:12/10/2014
Priority:NormalDue date:
Assignee:Radhika Chippada% Done:

67%

Category:Workbench
Target version:2017-03-29 sprint
Story points2.0Remaining (hours)0.00 hour
Velocity based estimate-

Description

The "show collection" page (for a collection that is writable by the current user) should have the following features:

  • Copy files from another collection see #3177
  • Delete files
  • Rename files
  • Move files to a different collection (maybe?)

Implemented in workbench using the existing Ruby SDK support. Trash can icons for delete & pencil icons for rename.


Subtasks

Task #4774: Removing files from a collectionClosed

Task #4773: Renaming files in collectionsClosed

Task #11265: Review branch 3821-collection-file-manageResolvedRadhika Chippada


Related issues

Related to Arvados - Feature #4808: [Workbench] "Add data from another project" modal support... New 12/12/2014
Duplicated by Arvados - Story #4594: [Workbench] In the collections page, provide the ability ... Resolved
Blocked by Arvados - Feature #5104: [SDKs] Add Ruby SDK methods for manipulating collection c... Resolved 03/08/2015
Blocked by Arvados - Story #5781: [API] [DRAFT] Provide API methods for manipulating and co... In Progress 04/21/2015

Associated revisions

Revision 2b27132d
Added by Radhika Chippada 3 months ago

closes #3821
Merge branch '3821-collection-file-manage'

History

#1 Updated by Peter Amstutz almost 3 years ago

  • Description updated (diff)
  • Category set to Workbench

#2 Updated by Peter Amstutz almost 3 years ago

  • Target version set to Arvados Future Sprints

#3 Updated by Peter Amstutz almost 3 years ago

  • Story points set to 2.0

#4 Updated by Tom Clegg over 2 years ago

  • Subject changed from [Workbench] Editing collections to [Workbench] Edit collections

#5 Updated by Tom Clegg over 2 years ago

  • Description updated (diff)

#6 Updated by Tom Clegg over 2 years ago

  • Target version changed from Arvados Future Sprints to 2015-02-18 sprint

#7 Updated by Radhika Chippada over 2 years ago

  • Assignee set to Radhika Chippada

#8 Updated by Tom Clegg over 2 years ago

  • Target version changed from 2015-02-18 sprint to Arvados Future Sprints

#9 Updated by Tom Clegg about 2 years ago

  • Description updated (diff)

#10 Updated by Tom Clegg about 2 years ago

  • Subject changed from [Workbench] Edit collections to [Workbench] Delete and rename files in collections
  • Description updated (diff)

#11 Updated by Tom Clegg about 2 years ago

  • Assignee deleted (Radhika Chippada)

#12 Updated by Tom Morris 4 months ago

  • Target version changed from Arvados Future Sprints to 2017-04-12 sprint

#13 Updated by Tom Morris 4 months ago

  • Description updated (diff)

#14 Updated by Tom Morris 3 months ago

  • Target version changed from 2017-04-12 sprint to 2017-03-29 sprint

#15 Updated by Radhika Chippada 3 months ago

  • Assignee set to Radhika Chippada

#16 Updated by Radhika Chippada 3 months ago

  • Status changed from New to In Progress

#17 Updated by Radhika Chippada 3 months ago

Branch 3821-collection-file-manage @ 07e060d

  • Added a "Remove selected files" option to the Selection dropdown collection#show page. This allows multiple files to be selected and removed from a collection per request
  • Added trash icon(s) to collection file row(s) in collection#show page. This allows removal of that particular file (row) from collection
  • Added pencil icon(s) to collection file row(s) in collection#show page. This allows renaming of that particular file in the collection. This is implemented using the current "render_editable_attribute" with appropriate enhancements made to this method. The editable input box displays the full path of the file. The user is allowed to: just change the file name or move it to a different existing subdirectory or even to an entirely new subdirectory
  • Added controller tests as well as (minimal required) integration tests

Test run @ https://ci.curoverse.com/job/developer-run-tests/215/

#18 Updated by Lucas Di Pentima 3 months ago

Some comments:

  • File apps/workbench/config/routes.rb:
    • Related detail: Could you update the rest of the routes so that instead of using the “:on => :member” style, use the newer “on: :member” for consistency?
  • File apps/workbench/test/controllers/collections_controller_test.rb:
    • Lines 644, 669, 693: Instead of asserting against a previously created string variable, wouldn’t be better to prove that the newly created collection’s manifest includes 0:0:file1?
    • Line 683: I think that assert_match is proving that ./file1 & ./file2 exist, but doesn’t prove that ./dir1/ is missing, maybe a $ is missing at the end of the regexp?
  • The pencil icon’s tooltip says “edit”, do you think it would be better to say “rename”?
  • Renaming a file the same as another file, makes that other file to be deleted. Is that on purpose? If so, maybe we can ask the user for confirmation.

#19 Updated by Radhika Chippada 3 months ago

Could you update the rest of the routes so that instead of using the “:on => :member” style, use the newer “on: :member” for consistency?

It would be desirable that "all" references are updated and thoroughly tested. So, didn't want to go there at this time. Will note it for next time around.

File apps/workbench/test/controllers/collections_controller_test.rb: Lines 644, 669, 693: Instead of asserting against a previously created string variable, wouldn’t be better to prove that the newly created collection’s manifest includes 0:0:file1?

Good catch. Updated the assertions

Line 683: I think that assert_match is proving that ./file1 & ./file2 exist, but doesn’t prove that ./dir1/ is missing, maybe a $ is missing at the end of the regexp?

Added the missing $ and also added another assertion fir "dir1".

The pencil icon’s tooltip says “edit”, do you think it would be better to say “rename”?
Renaming a file the same as another file, makes that other file to be deleted. Is that on purpose? If so, maybe we can ask the user for confirmation.

I improved the tooltip on the pencil icon in detailed now. It now says the user can change the file path (name or dir or both) and may not use duplicate names.

Thanks.

#20 Updated by Lucas Di Pentima 3 months ago

LGTM, please merge.

#21 Updated by Radhika Chippada 3 months ago

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

Applied in changeset arvados|commit:2b27132d13fd72f29dbab2297f0d2dc1c110eed1.

Also available in: Atom PDF