Skip to content

Commit

Permalink
Merge pull request #1774 from jmchilton/wf_fixes
Browse files Browse the repository at this point in the history
[16.01] Workaround for #1739 - fixing up subworkflow input connections.
  • Loading branch information
blankenberg committed Feb 23, 2016
2 parents b5e91d2 + dbab6f5 commit 5b720b4
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 22 deletions.
6 changes: 5 additions & 1 deletion client/galaxy/scripts/mvc/workflow/workflow-terminals.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,10 @@ define(['mvc/workflow/workflow-globals'], function( Globals ) {
_producesAcceptableDatatype: function( other ) {
// other is a non-collection output...
for ( var t in this.datatypes ) {
var thisDatatype = this.datatypes[t];
if( thisDatatype == "input" ) {
return true;
}
var cat_outputs = new Array();
cat_outputs = cat_outputs.concat(other.datatypes);
if (other.node.post_job_actions){
Expand All @@ -316,7 +320,7 @@ define(['mvc/workflow/workflow-globals'], function( Globals ) {
// FIXME: No idea what to do about case when datatype is 'input'
for ( var other_datatype_i in cat_outputs ) {
var other_datatype = cat_outputs[other_datatype_i];
if ( other_datatype == "input" || other_datatype == "input_collection" || Globals.app.isSubType( cat_outputs[other_datatype_i], this.datatypes[t] ) ) {
if ( other_datatype == "input" || other_datatype == "input_collection" || Globals.app.isSubType( cat_outputs[other_datatype_i], thisDatatype ) ) {
return true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion static/maps/mvc/workflow/workflow-terminals.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/scripts/bundled/analysis.bundled.js.map

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions static/scripts/bundled/libs.bundled.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/scripts/bundled/libs.bundled.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/scripts/mvc/workflow/workflow-terminals.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions test/qunit/tests/workflow_editor_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,13 @@ define([
ok( this.test_accept( other ) );
} );

test( "input type can accept any datatype", function() {
this.input.extensions = [ "input" ];
this.input_terminal.update( this.input );
var other = { node: {}, datatypes: [ "binary" ] };
ok( this.test_accept( other ) );
} );

test( "cannot accept when already connected", function() {
var self = this;
// If other is subtype but already connected, cannot accept
Expand Down

0 comments on commit 5b720b4

Please sign in to comment.