From 1ea2e3c4125cf9340e8fde52f338fa814f46c0b6 Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Wed, 13 Mar 2019 15:52:20 -0400 Subject: [PATCH] 14322: Update workbench to use new collectionUUID Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- .../app/controllers/container_requests_controller.rb | 2 +- apps/workbench/app/helpers/application_helper.rb | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/workbench/app/controllers/container_requests_controller.rb b/apps/workbench/app/controllers/container_requests_controller.rb index 783cafa117..454be448d9 100644 --- a/apps/workbench/app/controllers/container_requests_controller.rb +++ b/apps/workbench/app/controllers/container_requests_controller.rb @@ -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 diff --git a/apps/workbench/app/helpers/application_helper.rb b/apps/workbench/app/helpers/application_helper.rb index 15bf77fa09..e241b52d01 100644 --- a/apps/workbench/app/helpers/application_helper.rb +++ b/apps/workbench/app/helpers/application_helper.rb @@ -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 -- 2.30.2