Merge pull request #2342 from automatisch/fix-exported-flow-variables

fix(import-flow): update all variables in step parameters
This commit is contained in:
Ömer Faruk Aydın
2025-02-13 10:33:48 +01:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -117,7 +117,7 @@ describe('POST /api/v1/flows/import', () => {
key: 'text',
name: 'Text',
parameters: {
input: `hello {{step.${triggerStep.id}.query.sample}} world`,
input: `hello {{step.${triggerStep.id}.query.sample}} {{step.${triggerStep.id}.query.anotherSample}} world`,
transform: 'capitalize',
},
position: 2,
@@ -171,7 +171,7 @@ describe('POST /api/v1/flows/import', () => {
});
expect(newActionParameters).toMatchObject({
input: `hello {{step.${newTriggerStepId}.query.sample}} world`,
input: `hello {{step.${newTriggerStepId}.query.sample}} {{step.${newTriggerStepId}.query.anotherSample}} world`,
transform: 'capitalize',
});
});

View File

@@ -63,7 +63,7 @@ const updateParameters = (parameters, stepIdMap) => {
let updatedParameters = stringifiedParameters;
Object.entries(stepIdMap).forEach(([oldStepId, newStepId]) => {
updatedParameters = updatedParameters.replace(
updatedParameters = updatedParameters.replaceAll(
`{{step.${oldStepId}.`,
`{{step.${newStepId}.`
);