diff --git a/lib/galaxy/tool_util/verify/interactor.py b/lib/galaxy/tool_util/verify/interactor.py
index e8971a0ec4f5..59acc5195bdb 100644
--- a/lib/galaxy/tool_util/verify/interactor.py
+++ b/lib/galaxy/tool_util/verify/interactor.py
@@ -505,10 +505,14 @@ def stage_data_async(
tool_version: Optional[str] = None,
) -> Callable[[], None]:
fname = test_data["fname"]
+ tags = test_data.get("tags")
tool_input = {
"file_type": test_data["ftype"],
"dbkey": test_data["dbkey"],
}
+ if tags:
+ tool_input["tags"] = tags
+
metadata = test_data.get("metadata", {})
if not hasattr(metadata, "items"):
raise Exception(f"Invalid metadata description found for input [{fname}] - [{metadata}]")
@@ -1865,6 +1869,7 @@ def test_data_iter(required_files):
ftype=extra.get("ftype", DEFAULT_FTYPE),
dbkey=extra.get("dbkey", DEFAULT_DBKEY),
location=extra.get("location", None),
+ tags=extra.get("tags", []),
)
edit_attributes = extra.get("edit_attributes", [])
diff --git a/lib/galaxy/tools/actions/upload_common.py b/lib/galaxy/tools/actions/upload_common.py
index 8101af78b324..b549b99a493d 100644
--- a/lib/galaxy/tools/actions/upload_common.py
+++ b/lib/galaxy/tools/actions/upload_common.py
@@ -276,7 +276,13 @@ def new_upload(
)
else:
upload_target_dataset_instance = __new_history_upload(trans, uploaded_dataset, history=history, state=state)
-
+ if uploaded_dataset.tags:
+ new_tags = tag_handler.parse_tags_list(uploaded_dataset.tags.split(","))
+ for tag in new_tags:
+ log.info(f"applying item tag.... {tag}")
+ tag_handler.apply_item_tag(
+ user=trans.user, item=upload_target_dataset_instance, name=tag[0], value=tag[1], flush=True
+ )
if tag_list:
tag_handler.add_tags_from_list(trans.user, upload_target_dataset_instance, tag_list, flush=False)
diff --git a/test/functional/tools/parameters/gx_group_tag.xml b/test/functional/tools/parameters/gx_group_tag.xml
new file mode 100644
index 000000000000..90dd50e6ae03
--- /dev/null
+++ b/test/functional/tools/parameters/gx_group_tag.xml
@@ -0,0 +1,27 @@
+
+
+ macros.xml
+
+ '$output'
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/data_source/upload.xml b/tools/data_source/upload.xml
index 548b63163334..d8c7ace6b2ab 100644
--- a/tools/data_source/upload.xml
+++ b/tools/data_source/upload.xml
@@ -59,6 +59,7 @@
+