Skip to content

Commit

Permalink
CORE-1901 Fix list param default values in relaunch forms
Browse files Browse the repository at this point in the history
Tapis apps will auto-generate UUIDs in list param args,
so the relaunch default value ID will never match the list param.

It may be possible for DE apps to also change list param IDs.
  • Loading branch information
psarando committed Dec 13, 2024
1 parent 022475f commit 1a5c33f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/apps/launch/formatters.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,13 @@ const initGroupValues = (groups) =>

if (paramArgs?.length > 0) {
const defaultArg =
paramArgs.find((arg) => defaultValue?.id === arg.id) ||
(defaultValue &&
paramArgs.find((arg) => defaultValue.id === arg.id)) ||
// param arg IDs can change between jobs
(defaultValue &&
paramArgs.find(
(arg) => defaultValue.value === arg.value
)) ||
paramArgs.find((arg) => arg.isDefault);

value = defaultArg || "";
Expand Down

0 comments on commit 1a5c33f

Please sign in to comment.