Rebuilding filtered deck on experimental v2 empties deck and reschedules to the year 1745
I've been testing the experimental v2 scheduler and I've been able to consistently reproduce an error. If I make a filtered deck with criteria "deck name" is:due prop:due>-1 it will pull in the cards due today. However, when I rebuild it, it will remove everything from the deck and all the cards that were in the deck now have random dates in the year 1745.
I checked and this still occurs even with all add-ons disabled
I did the EXACT same thing step by step in a profile that syncs, and it did NOT have this issue.
Image of rescheduled due dates: https://imgur.com/a/NjvD0fp
Deck that I was using: https://drive.google.com/open?id=1N72zCZ29MivkBYGMz-_IZflei5UOYKId
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by ijg on 18 Sep, 2019 05:07 PM
I think this problem can be re-created as outlined in [1] in Anki 2.1.15 without any add-ons. As always: I'm not a programmer ...
[1]
'due': -15
'due': -100000
which is roughly 275 years ago in 1745.the function _fillDyn contains
due = (case when odue>0 then odue else due end)
. When you create a filtered deck with _moveToDyn you set "odue = due".Support Staff 2 Posted by Damien Elmes on 18 Sep, 2019 11:42 PM
The filtered deck code isn't expecting due dates before the creation of the collection. Thanks for the report, I've made a note to look into it.
3 Posted by The AnKing on 19 Sep, 2019 12:27 AM
Is there a reason why this would only cause issues when in a profile not associated with an account? Or will it still cause issues in an account associated profile? I don't want to use the v2 scheduler filtered decks if its going to screw up scheduling in the future
Support Staff 4 Posted by Damien Elmes on 20 Sep, 2019 02:13 AM
It is not connected with syncing. It will only happen if you import cards with existing scheduling into a collection that was created more recently than the cards were due - most users will not encounter the issue. If you reset the cards or reschedule them to be due after the collection creation date, it should resolve the issue.
Support Staff 5 Posted by Damien Elmes on 24 Sep, 2019 08:22 AM
Should be fixed in the latest beta:
https://anki.tenderapp.com/discussions/beta-testing/1589-anki-2116-...
6 Posted by The AnKing on 24 Sep, 2019 08:35 PM
Awesome! Thanks for addressing that!
7 Posted by lovac42 on 02 Oct, 2019 12:59 AM
@dae:
Is there any reason you choose to fix it this way? I see a different way of coding it by changing
odue>0
toodue!=0
in the emptyDyn method: https://github.com/dae/anki/blob/master/anki/schedv2.py#L1034This will also prevent addons that causes unintentional negative odues from screwing up the card schedules in a filtered deck. Such as: https://github.com/Arthur-Milchior/Anki-postpone-reviews/blob/master/init.py#L45-L46
Or is negative odues reserved for something else in V2?
Support Staff 8 Posted by Damien Elmes on 02 Oct, 2019 02:50 AM
IIRC, it would not solve the problem for cards with a due date of 0 (eg cards rescheduled to today on the first day user starts using Anki, cards imported with scheduling from another collection, etc)
9 Posted by lovac42 on 02 Oct, 2019 03:37 AM
I see, it would be nice to revise the SQL query to fix this in a more straight forward way, but I understand it can't be done immediately. Thanks. And I'll contact Arthur to update his addon.
10 Posted by arthur on 16 Oct, 2019 04:51 AM
FYI, the same fix is now in a Pull Request for ankidroid. https://github.com/ankidroid/Anki-Android/pull/5472/commits/8971e9c85c7bc8d897384738476c5cca110ed248#diff-7f010620d726ffe711b87a36f86ae4fb
Support Staff 11 Posted by Damien Elmes on 16 Oct, 2019 11:02 AM
I presume that's the wrong link, but thank you for porting the change.
12 Posted by arthur on 16 Oct, 2019 07:14 PM
Link edited