Skip to content

Commit

Permalink
Merge pull request #16869 from mvdbeek/fix_step_copy
Browse files Browse the repository at this point in the history
[23.1] Fix workflow import losing tool_version
  • Loading branch information
jdavcs authored Oct 17, 2023
2 parents fef87ab + 94a12ee commit bf1df29
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/galaxy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7766,6 +7766,7 @@ def copy_to(self, copied_step, step_mapping, user=None):
copied_step.order_index = self.order_index
copied_step.type = self.type
copied_step.tool_id = self.tool_id
copied_step.tool_version = self.tool_version
copied_step.tool_inputs = self.tool_inputs
copied_step.tool_errors = self.tool_errors
copied_step.position = self.position
Expand Down
8 changes: 8 additions & 0 deletions lib/galaxy_test/api/test_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -1161,6 +1161,14 @@ def test_import_published(self):
self._assert_status_code_is(other_import_response, 200)
self._assert_user_has_workflow_with_name("imported: test_import_published")

def test_import_published_api(self):
workflow_id = self.workflow_populator.simple_workflow("test_import_published", publish=True)
with self._different_user():
other_import_response = self.__import_workflow(workflow_id, deprecated_route=False)
self._assert_status_code_is(other_import_response, 200)
workflow = self._download_workflow(other_import_response.json()["id"])
assert workflow["steps"]["2"]["tool_version"] == "1.0.0"

def test_export(self):
uploaded_workflow_id = self.workflow_populator.simple_workflow("test_for_export")
downloaded_workflow = self._download_workflow(uploaded_workflow_id)
Expand Down

0 comments on commit bf1df29

Please sign in to comment.