open-forms icon indicating copy to clipboard operation
open-forms copied to clipboard

Importing forms from other environments can never "merge" identical steps

Open LaurensBurger opened this issue 11 months ago • 1 comments

Thema / Theme

Form designer

Omschrijving / Description

As a form designer with multiple environments i want to be able to import/export forms between these environments and and not create unique form definitions if they are identical. This issue arises when a form is imported, the uuid's are updated. which causes the next import to create unique form definitions.

i have 4 exported forms that all share the same reusable step:

form 1: reusable step X with uuid: 17d42fdc-217d-4eaa-963e-8b7b685bb45d form 2: reusable step X with uuid: 17d42fdc-217d-4eaa-963e-8b7b685bb45d form 3: reusable step X with uuid: 17d42fdc-217d-4eaa-963e-8b7b685bb45d form 4: reusable step X with uuid: 17d42fdc-217d-4eaa-963e-8b7b685bb45d

i expect when i import them they will again be identical/reusable.

When importing the first form the result is: form 1: reusable step X with uuid: 1f002e1f-d28f-4d1a-9389-d654da7b9063

And when form 2 is imported: 1f002e1f-d28f-4d1a-9389-d654da7b9063 != 17d42fdc-217d-4eaa-963e-8b7b685bb45d

so after form 2 exports in contains: form 2: reusable step X with uuid: f93a671a-2d90-4d71-9c84-499a8ca66e89

etc.

The end result is 4 unique form defintions: form 1: reusable step X with uuid: 1f002e1f-d28f-4d1a-9389-d654da7b9063 form 2: reusable step X with uuid: f93a671a-2d90-4d71-9c84-499a8ca66e89 form 3: reusable step X with uuid: 106cfc22-ef2a-4bd4-b5b7-f76bab391bd4 form 4: reusable step X with uuid: 8c7c8853-dcfd-4a26-89d7-cd337896e2b2

Workaround:

  1. import form 1
  2. Edit form 1 step X with uuid from previous environment (via cURL)
  3. Import form 2
  4. Import form 3
  5. Import form 4

Result: form 1: reusable step X with uuid: 17d42fdc-217d-4eaa-963e-8b7b685bb45d form 2: reusable step X with uuid: 17d42fdc-217d-4eaa-963e-8b7b685bb45d form 3: reusable step X with uuid: 17d42fdc-217d-4eaa-963e-8b7b685bb45d form 4: reusable step X with uuid: 17d42fdc-217d-4eaa-963e-8b7b685bb45d

LaurensBurger avatar Mar 08 '24 11:03 LaurensBurger