From f60547042fd474e2d82f893be45e0264913a8efe Mon Sep 17 00:00:00 2001 From: Ahmed Awan Date: Tue, 11 Jun 2024 17:53:21 -0500 Subject: [PATCH] use latest version's name on `WorkflowRun` forms Show the name corresponding to the `WorkflowRun` form workflow's version. --- lib/galaxy/managers/workflows.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/galaxy/managers/workflows.py b/lib/galaxy/managers/workflows.py index 35089bc5e4a3..7f57f698e5f2 100644 --- a/lib/galaxy/managers/workflows.py +++ b/lib/galaxy/managers/workflows.py @@ -919,6 +919,9 @@ def to_format_2(wf_dict, **kwds): raise exceptions.RequestParameterInvalidException(f"Unknown workflow style {style}") if version is not None: wf_dict["version"] = version + # If returning a run-form workflow for a specific version, use that version's name + if style == "run": + wf_dict["name"] = workflow.name else: wf_dict["version"] = len(stored.workflows) - 1 return wf_dict