Closed HayleyMills closed 1 month ago
@HayleyMills the issue here was actually that the original export didn't have the correct URN in them. I've updated both staging and alspac so you should be able to now export it correctly.
Tested again by exporting and importing the same instrument in alspac instance and the import worked.
Do I need to test the other instances, or will the fix need to be rolled out to the others?
Tested on staging, creating new response domains, code lists, question items (question grids not working), question construct, condition, loop, statement and sequence, exported both xml and imported both. Both have errors
https://closer-archivist-staging.herokuapp.com/admin/imports/1258 https://closer-archivist-staging.herokuapp.com/admin/imports/1257
@HayleyMills Can you try to export and import again on staging please.
Will do - The same one, or a newly created one?
Can you export the new same one and try to import it again. The exported XML should change.
Which instrument did you export this from?
The same one test111
ok found something, bear with me
@HayleyMills can you try to export and import again please on staging. You'll need to do fresh export as that's what is primarily affected.
They uploaded successfully.
Sorry reopening, as although it said it was successful, it didn't upload everything, it is missing a sequence and statement. it looks like it's in the xml which was exported.
which staging instrument was this? could i get a link the import
https://closer-archivist-staging.herokuapp.com/admin/imports/1264
If you look at the build totals and compare original https://closer-archivist-staging.herokuapp.com/instruments/test111/build/ with the imported one https://closer-archivist-staging.herokuapp.com/instruments/test111_4/build/
Issue related to Sequences being inside loops, they have the incorrect URN (one is padded with 000) and so the new slug ID was not correct either. HM to check that there are no occasions of this which have been exported and loaded into Discovery.
@HayleyMills this is on staging if you'd like to try again?
Re-exported and imported as _may, and all constructs are there.
Double checked, and there are no issues in Discovery with missing sequences inside loops.
There is no copy function in Archivist (maybe we could add this if straightforward), so I download an instrument and change the file name and the prefix in the file, then upload. This has caused the error https://closer-archivist-alspac.herokuapp.com/admin/imports/341
Record Invalid : PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_codes_on_ddi_slug_and_instrument_id" DETAIL: Key (ddi_slug, instrument_id)=(, 1813) already exists.
Downloaded alspac_16_la24.txt
Edited alspac_16_la24_test.txt