Skip to content

Bug: Restoring the Note Type does not restore the existing notes properly #4715

@KT-1114

Description

@KT-1114

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions