Has anyone worked on a migration (script) from PFG to collective.easyform?
Not that I'm aware of. It would be nice also try to make easyform "feature complete" (in terms of what PFG can do). Not sure anyone has looked at that feature list systematically.
I started working today on the PFG -> EasyForm migration...this will likely go into a transmogrifier step.
For now:
- I can export all PFG forms using a slightly hacked version of collective.jsonify (one export per
FormFolder
instance - I can recreate a standard PFG form with standard fields as
EasyForm
instance. The more or less tricky part is to filter the form fields from the JSON files and build an XML supermodel for the PFG field data...this is working so far for text and string field type, date field and selection type....which should cover the majority of the usecase - rebuilding the XML supermodel for the actions will work the same way
The screenshots shows a styles PFG form under Plone 4 and the migrated form under collective.easyform on Plone 5.2
I think it would be really useful to have it as some kind of optional upgrade step (is that possible) or else a button in the control panel if possible? Would make it accessible to those who don’t have experience with transmogrifier (which is a bit of a learning curve)
Perhaps doable but currently outside the scope of my work since we are working on a large scale transmogrifier-based migration. And therefore the collective.jsonify output is the input for the migration work. Of course I can provide the code (have to check with my customer first). So in the end it does make much difference between ripping the properties from some python pickles of an old PFG instance of from a proper JSON output.
By public demand I put together the current state of our migration code for the University Gent:
https://public.zopyx.com/ugent.plone5migration.zip
The PFG -> EasyForm migration is located in the file pfg.py.
Also already mentioned the code is based on our approach using collective.jsonify for the export, ArangoDB inbetween as migration database and our "magic" migration script for the import over plone.restapi. The magic migration script is also included...
Use the stuff at your own risk...I will talk about this migration project at the Plone conference in Ferrara.
Thank you Andreas for sharing!
I have been trying and using the code you provided. Thanks a lot !
Would you mind sharing your custom collective.jsonify ?
https://public.zopyx.com/ugent.plone5migration.zip
now contains also our version of collective.jsonify
The stuff resides in the UGent private Github repos...so I have to create dumps of both the packages.
@zopyx Thanks