Project

General

Profile

Actions

Bug #11846

closed

[Workbench] NoMethodError when renaming an image file

Added by Tom Clegg almost 7 years ago. Updated almost 7 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Radhika Chippada
Category:
-
Target version:
Story points:
-

Description

Error occurred on 4xphq
  • Workbench version 0e3369b-8
  • API version 87c9678-8
#<NoMethodError: undefined method `filename' for #<Collection:0x0000000539fe68>
Did you mean?  file_names>
/var/www/arvados-workbench/shared/vendor_bundle/ruby/2.3.0/gems/activemodel-4.1.12/lib/active_model/attribute_methods.rb:435:in `method_missing'
/var/www/arvados-workbench/shared/vendor_bundle/ruby/2.3.0/gems/activerecord-4.1.12/lib/active_record/attribute_methods.rb:213:in `method_missing'
/var/www/arvados-workbench/current/app/controllers/application_controller.rb:353:in `block in update'
/var/www/arvados-workbench/current/app/controllers/application_controller.rb:352:in `each'
/var/www/arvados-workbench/current/app/controllers/application_controller.rb:352:in `update'
/var/www/arvados-workbench/current/app/controllers/collections_controller.rb:344:in `update'
...
{"method":"POST","path":"/collections/4xphq-4zz18-7kbe1wl6dkc1elv","format":"json","controller":"collections","action":"update","status":422,"duration":964.22,"view":0.26,"db":0.0,"params":{"current_request_id":"1497298406-192235905","collection":{"filename":"rupert_DSC_0403_jpg"},"_method":"put"},"@timestamp":"2
017-06-12T20:13:27.346Z","@version":"1","message":"[422] POST /collections/4xphq-4zz18-7kbe1wl6dkc1elv (collections#update)"}

I'm guessing it has to do with the difference between image and non-image cases in source:apps/workbench/app/views/_show_files.html

Image case:

<%= render_editable_attribute object, 'filename', filename, {'data-value' => file_path, 'data-toggle' => 'manual', 'selection_path' => 'rename-file-path:'+file_path}, {tiptitle: 'Edit name or directory or both for this file', btnclass: 'collection-file-control'} %>

Non-image case:

<%= render_editable_attribute object, 'filename', filename, {'data-value' => file_path, 'data-toggle' => 'manual', 'selection_name' => 'rename-file-path:'+file_path}, {tiptitle: 'Edit name or directory or both for this file', btnclass: 'collection-file-control'}  %>


Subtasks 1 (0 open1 closed)

Task #11882: Review 11846-collection-image-file-renameResolvedRadhika Chippada06/12/2017Actions
Actions #1

Updated by Radhika Chippada almost 7 years ago

  • Target version set to 2017-07-05 sprint
Actions #2

Updated by Radhika Chippada almost 7 years ago

  • Assigned To set to Radhika Chippada
Actions #3

Updated by Radhika Chippada almost 7 years ago

  • Status changed from New to In Progress
Actions #4

Updated by Lucas Di Pentima almost 7 years ago

Reviewing 231c53a6b

Just one small detail:
  • File apps/workbench/test/controllers/collections_controller_test.rb:L747 Repeated line.

With that, LGTM. Thanks!

Actions #5

Updated by Radhika Chippada almost 7 years ago

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

Applied in changeset arvados|commit:cabba9a1b8046d1c75c302659cc23de59689ce69.

Actions

Also available in: Atom PDF