Merge pull request #22291 from mvdbeek/fix_hdca_multiple_true_selection

[26.0] Fix HDCA shown as unavailable on tool form rerun
This commit is contained in:
John Chilton
2026-03-29 14:42:31 -04:00
committed by GitHub
+13 -3
View File
@@ -2452,15 +2452,25 @@ class DataToolParameter(BaseDataToolParameter):
# Route each to the correct options list by type so the client can
# match them by id *and* src.
for value in job_input_values:
if isinstance(value, (HistoryDatasetCollectionAssociation, HistoryDatasetAssociation)):
if isinstance(value, HistoryDatasetCollectionAssociation):
# HDCAs are handled by the dataset collections section below;
# only add here if not visible in the current history.
if value.deleted or not value.visible or value.history != history:
if value.deleted:
state = "deleted"
elif not value.visible:
state = "hidden"
else:
state = "not in current history"
append(d["options"]["hdca"], value, f"({state}) {value.name}", "hdca", True)
elif isinstance(value, HistoryDatasetAssociation):
if value.deleted:
state = "deleted"
elif not value.visible:
state = "hidden"
else:
state = "not in current history"
src = "hdca" if isinstance(value, HistoryDatasetCollectionAssociation) else "hda"
append(d["options"][src], value, f"({state}) {value.name}", src, True)
append(d["options"]["hda"], value, f"({state}) {value.name}", "hda", True)
elif isinstance(value, DatasetCollectionElement):
append_dce(value)
elif isinstance(value, LibraryDatasetDatasetAssociation):