Skip to content

Commit 967bd6b

Browse files
committed
Fix migrating save actions with field=first_name
1 parent f86603f commit 967bd6b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

legacy/definition.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ func migrateAction(baseLanguage utils.Language, a Action, localization flows.Loc
538538
// we can emulate setting only the first name with an expression
539539
if a.Field == "first_name" {
540540
migratedValue = strings.TrimSpace(migratedValue)
541-
migratedValue = fmt.Sprintf("%s @(word_slice(contact.name, 2, -1))", migratedValue)
541+
migratedValue = fmt.Sprintf("%s @(word_slice(contact.name, 1, -1))", migratedValue)
542542
}
543543

544544
return &actions.SetContactPropertyAction{

legacy/testdata/migrations/actions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@
265265
"type": "set_contact_property",
266266
"uuid": "5a4d00aa-807e-44af-9693-64b9fdedd352",
267267
"property": "name",
268-
"value": "@run.input @(word_slice(contact.name, 2, -1))"
268+
"value": "@run.input @(word_slice(contact.name, 1, -1))"
269269
},
270270
"expected_localization": {}
271271
},

0 commit comments

Comments
 (0)