Skip to content

fix(forms): fix standard fields migration

Ben Whitmore requested to merge fix-standard-fields-migration-20240115 into main

Migration for the standardised fields work (!955 (merged)) was failing on kotahidev, because some documents contained multiple fields that meant the same thing (e.g. submission.title and submission.articleDescription, which are both supposed to be migrated into submission.$title), and this was being detected as an unexpected conflict.

This seems to have resulted from various testing and reorganising of forms that has occurred on Kotahidev, and may not be representative of most instances of Kotahi, but I have fixed it nonetheless by giving the fields a priority order, so that the most 'canonical' field that has a value gets chosen, and conflicting fields are discarded. I've also tidied up afew other things.

Merge request reports