Importing Cards: the number Updated is often all the cards

Am running the Linux Anki desktop Version 2.1.44 (b2b3275f). I am using the new scheduler, but have selected Legacy timezone handling, as I use AnkiDroid, which does not yet support the modern timezone handling.

All my decks have a unique identifier (Note ID). All unique identifiers are unique across the entire collection, so there is no chance of a card update affecting another deck.

One of my cards has some HTML in one of the fields, and whenever I update only a few cards, I import the CSV and all 5000+ cards are updated. This did not use to happen.

Other times, when I import into another deck, it is reported that all cards have been updated or several more cards updated than changes I had placed in the spreadsheet (which became the CSV).

The cards and decks don’t appear to have been damaged or changed in any unintended way, but the number of updated cards is confusing.

Some of these decks have been shared on Anki’s Shared Decks area.

AnkiDroid supports the new timezone handling since version 2.1.15. You could check if the problem persists after updating the app.

1 Like

Please boil it down into a minimal example, eg a csv with a few cards that shows changes when imported twice into a new profile, as that will make it easier to look into.

Attached a small profile with one deck of five reversible cards. In the zip file is a CSV with five rows representing the five cards. Make a small change in e.g. the English column, then import.

Import allowing HTML, and Updating records that match the first field. It should report to you that you have had five notes updated, not one.

That help?

(Attachment import_this_when_unzipped.zip is missing)

(Attachment DE import issues collection-2021-07-19@19-21-24.colpkg is missing)

Ta. How do I attach the small profile and CSV to be imported? I tried to reply to the email, but the attachments were expunged (total size only 103 kB).
I’ve tested with five notes in the deck (the only one in the new profile) and a CSV with five rows corresponding to the five notes in the deck.
Making only a single change in e.g. the English column, gives me a “5 notes updated” upon import.

Thanks for that. I’m afraid this site doesn’t support apkg attachments, so please use Google Drive or some other free file sharing site, then post a link here.

Here is the collection and the CSV to be imported.

Thanks, Damien!

Thanks, @kleinerpirat ! It now works. Earlier updates specifically said that the issue was not yet supported. The latest update did not say that it was supported, so I assumed it was still not supported. Just tried now and all is working! Thank you.

1 Like

Thanks, reproduced. It’s happening because the tags in your file are not in alphabetical order. The importing code is due for an update soon, and I’ll bear this in mind when working through it.

Hah! It was really that simple?! Thanks for letting me know. I hadn’t realised that the tags should have been in alphabetical order.

Many thanks for catching it, and I am glad that nothing is really broken.