Change Card Creation Time - possible bug

Hello @dae,

I’m currently having a problem with the add-on “Change Card Creation Time” you’ve ported. I’ve downloaded a deck from a website and wanted to have the creation times according to when I’ve imported it. In the past, this has worked for me, but now, there is some strange bug/behaviour:

Reproduction steps:

1. select cards to change the creation time of
2. Change creation time to "2020/10/28"
3. confirm database full-sync required
4. "Created" date shows the correct date, 2020-10-28
5. However, rightclick -> Info shows: Added	+49153-11-04
6. Hence, such cards also appear in added:1, even though they should not

Debug Info:

Anki 2.1.36 (53a984ba) Python 3.8.0 Qt 5.14.2 PyQt 5.14.2
Platform: Mac 10.15.7
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2020-11-02 10:14:40

===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
'' ['anki-search-inside-add-card', 0, 'None', mod]
Add Cards - Web Browser ['1783260740', 2020-10-28T07:35, 'None', '']
Add card default copies current cards tag and deck in ['676957592', 2020-04-03T11:47, 'None', '']
Anki Simulator ['817108664', 2020-07-21T16:17, 'None', '']
AnkiWebView Inspector ['31746032', 2019-05-03T00:43, 'None', '']
Auto Ease Factor ['1672712021', 2020-10-31T16:38, 'None', mod]
BetterTags ['bettertags', 2020-04-28T17:40, 'None', '']
Change Card Creation Times ['217650262', 2019-03-05T03:59, 'None', '']
Cloze Overlapper ['cloze_overlapper', 2019-02-01T13:37, 'None', '']
Customize Sidebar ['1988760596', 2020-01-28T11:44, 'None', '']
Edit Field During Review Cloze ['385888438', 2020-06-11T14:32, 'None', '']
Enhance main window ['877182321', 2020-09-02T23:49, 'None', mod]
Frozen Fields ['516643804', 2020-03-01T05:12, 'None', '']
Image Occlusion Enhanced for Anki 21 alpha ['1374772155', 2020-04-28T04:21, 'None', '']
Pop-up Dictionary beta ['153625306', 2019-03-23T18:32, 'None', '']
Resize images in editor ['1103084694', 2020-08-02T15:04, 'None', mod]
Review Heatmap ['review_heatmap', 2020-04-30T15:23, 'None', '']
Symbols As You Type ['2040501954', 2020-04-30T16:32, 'None', '']

===IDs of active AnkiWeb add-ons===
1103084694 1374772155 153625306 1672712021 1783260740 1988760596 2040501954 217650262 31746032 385888438 516643804 676957592 817108664 877182321

Any input on that one?

I can’t reproduce this - Added in Card Info appears correctly for me after using the date 2020/10/28

1 Like

Thanks for taking the time to look into this!

Hm, I think I misunderstand the database. It seems to be that “Date Created” is separated from the “Added” value? For whatever reason, the imported file has a very strange “Added” date for all of the cards.


What would be the simplest way to fix this without losing the scheduling information?

I’d be relatively comfortable with editing the SQL manually, but I do not understand the format of the database and would need some hints.

That card ID is 1000x bigger than it should be. When I performed the same test, the ID was the same number of digits as the note ID. Maybe another add-on, or something else going on?

This is what the freshly imported card from the deck looks like. I can upload a test deck with a few cards if there is the need. To clarify, I first thought the issue is linked to your add-on, but this is no longer the case.

Hard to tell if it is any add-on bug, since I have downloaded this particular deck from the internet. Worst case, I’d have to regenerate this deck from a CSV export. I’ve only got scheduling information on a couple of cards, but it would be nice to know if there was another ways to fix the issue.

Can you confirm or deny that Added is separated from Created? The Created columns gets changed by your add-on without any problem, I just have this problem with the Added date (and the Card ID) now.

EDIT Sample of the deck with the issue:

1 Like

Hm, judging by the fact that this is a bit complex due to changes which would also have to occur in the revlog, and so on, I decided that the time investment wouldn’t be worth keeping my scheduling data and reimported as a CSV, which obviously fixed the issues this deck had.

I will inform the website where I’ve got the deck from of this issue.

Anyway, if there are some solutions for bulk-changing the CID/Added date while keeping the revlog of the cards intact, I’d be happy to hear about it from anyone!

1 Like

The deck author probably used external software to create the deck, and did not do so correctly. You may be able to use some sql statements to adjust the card ids over a given number - you would need to back things up first, and apply the same transform to the review log.

1 Like

Oh, and you’ll need to force a full sync afterwards.