Skip to content

[BUG] setting a custom keyword for a character doesn't update related production characters #205

Description

@izik1

Describe the bug
Kinda a two for one in the same spot
setting a custom keyword for a character doesn't update the keyword in production characters it's a primitive of/are primitives of it
also, by the same effect, updating the story/keyword of a card updates all recognition cards.

To Reproduce
Steps to reproduce the behavior:

  • make/already have production and recognition cards for: , ,
  • update the keyword of 音 (perhaps to おと, or, if we feel like using ascii, sounds, just, something different than the default or whatever it already is)
  • if you have a large number of recognition cards, notice the wait time
  • observe that every recognition card in the collection wants to sync (for me that's over 1000 cards in my next sync!)
  • observe that 日 and 暗 still have the old keyword for 音 when viewed through their production cards in the card browser, but when viewed the recognition card are updated.

This query filter is off incorrect:

note_ids = aqt.mw.col.find_notes(
" OR ".join(ct_find_filter) + f' AND "Character:{character}"'
)

Expected behavior
When updating a keyword / story, all related notes should update (to have the right keyword for the original note) and only those notes should update.

Desktop (please complete the following information):

  • OS and Version: Linux (NixOS, actual OS details unimportant)
  • Anki Version 23.12beta2 (presumably no related issues with Anki itself)

Additional context
I'm willing to fix this (even have a partial fix ready), just want to write it down and be told "yeah, sure"

Screenshots
If applicable, add screenshots to help explain your problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions