Restoring the note type messes up the existing notes of that type.
For instance, if you create a simple note, move the fields (in this case, swapping them), and then use the card editor template to restore it, the back field will appear as question and answer fields in the browser, but the actual question and answer in the reviewer will appear as front and back fields (as expected). Similar to how basic and reversed note fields might go wrong, in this instance the reversed card is also erased. I believe col.backend.restoreNotetypeToStock() to be the cause after trying to identify it. Other note types have similar problems.
To help you better understand the issue and reproduce it, I am attaching few video attachments and some tests (AnkiDroid): Video of restoring Basic Note, Video of restoring Basic and Reversed, Video of restoring Close Note, and Tests of the same.
I have only made contributions to AnkiDroid, but if permitted, I would like to work on the issue.
Restoring the note type messes up the existing notes of that type.
For instance, if you create a simple note, move the fields (in this case, swapping them), and then use the card editor template to restore it, the back field will appear as question and answer fields in the browser, but the actual question and answer in the reviewer will appear as front and back fields (as expected). Similar to how basic and reversed note fields might go wrong, in this instance the reversed card is also erased. I believe col.backend.restoreNotetypeToStock() to be the cause after trying to identify it. Other note types have similar problems.
To help you better understand the issue and reproduce it, I am attaching few video attachments and some tests (AnkiDroid): Video of restoring Basic Note, Video of restoring Basic and Reversed, Video of restoring Close Note, and Tests of the same.
I have only made contributions to AnkiDroid, but if permitted, I would like to work on the issue.