14322: Update workbench to use new collectionUUID
authorPeter Amstutz <pamstutz@veritasgenetics.com>
Wed, 13 Mar 2019 19:52:20 +0000 (15:52 -0400)
committerPeter Amstutz <pamstutz@veritasgenetics.com>
Fri, 15 Mar 2019 15:33:29 +0000 (11:33 -0400)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz@veritasgenetics.com>

apps/workbench/app/controllers/container_requests_controller.rb
apps/workbench/app/helpers/application_helper.rb

index 783cafa117d9c23b3641f5f9883b90ea066be384..454be448d9d1e7afad061ac983cd38780abd1365 100644 (file)
@@ -120,7 +120,7 @@ class ContainerRequestsController < ApplicationController
             c = Collection.find(re[1])
             input_obj[param_id] = {"class" => primary_type,
                                    "location" => "keep:#{c.portable_data_hash}#{re[4]}",
-                                   "arv:collection" => input_obj[param_id]}
+                                   "http://arvados.org/cwl#collectionUUID" => re[1]}
           end
         end
       end
index 15bf77fa094f188e5b3f8be980c5c57e3d73bcfe..e241b52d0157e3ef602fccfd86f1797ed6f9157a 100644 (file)
@@ -495,11 +495,12 @@ module ApplicationHelper
       chooser_title = "Choose a #{primary_type == 'Directory' ? 'dataset' : 'file'}:"
       selection_param = object.class.to_s.underscore + dn
       if attrvalue.is_a? Hash
-        display_value = attrvalue[:"arv:collection"] || attrvalue[:location]
+        display_value = attrvalue[:"http://arvados.org/cwl#collectionUUID"] || attrvalue[:"arv:collection"] || attrvalue[:location]
         re = CollectionsHelper.match_uuid_with_optional_filepath(display_value)
+        locationre = CollectionsHelper.match(attrvalue[:location])
         if re
-          if re[4]
-            display_value = "#{Collection.find(re[1]).name} / #{re[4][1..-1]}"
+          if locationre[4]
+            display_value = "#{Collection.find(re[1]).name} / #{locationre[4][1..-1]}"
           else
             display_value = Collection.find(re[1]).name
           end