diff --git a/client/galaxy/scripts/mvc/workflow/workflow-terminals.js b/client/galaxy/scripts/mvc/workflow/workflow-terminals.js index 9791cf2ec50..fd90296d9af 100644 --- a/client/galaxy/scripts/mvc/workflow/workflow-terminals.js +++ b/client/galaxy/scripts/mvc/workflow/workflow-terminals.js @@ -157,14 +157,21 @@ var Terminal = Backbone.Model.extend({ }); }, setMapOver: function(val) { + let output_val = val; if (this.multiple) { - return; // Cannot set this to be multirun... + // emulate list input + let description = new CollectionTypeDescription('list'); + if (val.collectionType === description.collectionType) { + // No mapping over necessary + return; + } + output_val = val.effectiveMapOver ? val.effectiveMapOver(description): val; } if (!this.mapOver().equal(val)) { this.terminalMapping.setMapOver(val); _.each(this.node.output_terminals, outputTerminal => { - outputTerminal.setMapOver(val); + outputTerminal.setMapOver(output_val); }); } }, @@ -407,11 +414,8 @@ var InputTerminal = BaseInputTerminal.extend({ // collection (yet...) return false; } - if (otherCollectionType.rank == 1) { - return this._producesAcceptableDatatype(other); - } else { - // TODO: Allow subcollection mapping over this as if it were - // a list collection input. + if (otherCollectionType.collectionType.endsWith('paired')) { + // shouldn't process pairs in multiple="true" input return false; } } diff --git a/client/galaxy/scripts/mvc/workflow/workflow-view-terminals.js b/client/galaxy/scripts/mvc/workflow/workflow-view-terminals.js index a43e1be25b5..2458de63f78 100644 --- a/client/galaxy/scripts/mvc/workflow/workflow-view-terminals.js +++ b/client/galaxy/scripts/mvc/workflow/workflow-view-terminals.js @@ -77,9 +77,7 @@ var BaseInputTerminalView = TerminalView.extend({ const name = input.name; const id = `node-${node.cid}-input-${name}`; const terminal = this.terminalForInput(input); - if (!terminal.multiple) { - this.setupMappingView(terminal); - } + this.setupMappingView(terminal); this.el.terminal = terminal; this.$el.attr("input-name", name); this.$el.attr("id", id); diff --git a/client/galaxy/scripts/qunit/tests/workflow_editor_tests.js b/client/galaxy/scripts/qunit/tests/workflow_editor_tests.js index 2836d353f27..4db44c86556 100644 --- a/client/galaxy/scripts/qunit/tests/workflow_editor_tests.js +++ b/client/galaxy/scripts/qunit/tests/workflow_editor_tests.js @@ -545,6 +545,8 @@ QUnit.module("Node view ", { input_terminals: {}, output_terminals: {}, markChanged: function() {}, + hasConnectedOutputTerminals: function() {}, + connectedMappedInputTerminals: function() {}, terminalMapping: { disableMapOver: function() {} } }); }, @@ -1174,7 +1176,14 @@ QUnit.test("multiple input attachable by collections", function(assert) { this.verifyAttachable(assert, this.inputTerminal1, "list"); }); -QUnit.test("unconnected multiple inputs cannot be connected to rank > 1 collections (yet...)", function(assert) { +QUnit.test("multiple input attachable by nested collections", function(assert) { + this.inputTerminal1 = this.newInputTerminal(null, { multiple: true }); + var connectedInput1 = this.addConnectedInput(this.inputTerminal1); + this.addConnectedOutput(connectedInput1); + this.verifyAttachable(assert, this.inputTerminal1, "list:list"); +}); + +QUnit.test("Multiple inputs cannot be connected to pairs", function(assert) { this.inputTerminal1 = this.newInputTerminal(null, { multiple: true }); this.verifyNotAttachable(assert, this.inputTerminal1, "list:paired"); });