orbeon / orbeon-forms

Orbeon Forms is an open source web forms solution. It includes an XForms engine, the Form Builder web-based form editor, and the Form Runner runtime.
http://www.orbeon.com/
GNU Lesser General Public License v2.1
514 stars 221 forks source link

Improved simple data migration #5415

Open ebruchez opened 2 years ago

ebruchez commented 2 years ago

With #1523 (released in Orbeon Forms 2018.2), we implemented simple data migration.. The feature supports only:

But we have some inconsistent behavior related to moving fields:

We should improve simple data migration to support moving fields.

For every XML element, identified by name, that is removed from a place and added to another, not only, as is done now, delete/add the element, but also copy its content, including:

Possibly unsupported: moving a field from a non-repeated container to a repeated container and vice-versa.

This would allow us to tell form authors that simply moving a form control in a form, no matter where (except repeated content) doesn't require publishing a new form version.

ebruchez commented 2 years ago

The way simple data migration works is that we gather Delete and Insert operations. It should be easy to go through that list of operations and match Deletes and Inserts that have the same element name. If that's really all there is to it, then it's a super simple implementation.