fix(forms): fix standard fields migration
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.