Skip to content

Commit

Permalink
Allow connecting integer param into data column parameter
Browse files Browse the repository at this point in the history
Closes #16491
  • Loading branch information
mvdbeek committed Aug 9, 2024
1 parent 03a7fda commit dc632c3
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
13 changes: 12 additions & 1 deletion client/src/components/Workflow/Editor/modules/terminals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,18 @@ export class InputParameterTerminal extends BaseInputTerminal {
}

effectiveType(parameterType: string) {
return parameterType == "select" ? "text" : parameterType;
let newType: string;
switch (parameterType) {
case "select":
newType = "text";
break;
case "data_column":
newType = "integer";
break;
default:
newType = parameterType;
}
return newType;
}
attachable(other: BaseOutputTerminal) {
const effectiveThisType = this.effectiveType(this.type);
Expand Down
15 changes: 15 additions & 0 deletions lib/galaxy_test/workflow/integer_into_data_column.gxwf-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
- doc: |
Test to verify text parameter can be connected to data column param
job:
input:
type: File
value: 2.tabular
file_type: tabular
column:
value: "2"
type: raw
outputs:
output:
asserts:
- that: has_line
line: "parameter: 2"
15 changes: 15 additions & 0 deletions lib/galaxy_test/workflow/integer_into_data_column.gxwf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
class: GalaxyWorkflow
inputs:
input:
type: data
column:
type: integer
outputs:
output:
outputSource: data_column_step/output
steps:
data_column_step:
tool_id: gx_data_column
in:
ref_parameter: input
parameter: column

0 comments on commit dc632c3

Please sign in to comment.