Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Exclude entries for rescheduling cards when getting review data #853

Conversation

RisingOrange
Copy link
Collaborator

@RisingOrange RisingOrange commented Dec 27, 2023

This PR is based on #788.

We are getting data about reviews the user did from Anki's review log table. The review log table contains an entry for each review the user does. However entries are also added to the table when the user uses the Set Due Date context menu action in the Anki browser to reschedule a card (https://docs.ankiweb.net/browsing.html?highlight=set%20due%20date#cards). These entries have a type value of REVLOG_RESCHED (https://github.com/ankitects/anki/blob/51a10f096940dbd9d86b7a434612e3b8b9469cc7/pylib/anki/consts.py#L92).
We should exclude these entries, because they don't represent reviews. This way the review counts we get will be more accurate.

Related issues

fix: Exclude entries for rescheduling cards when getting review data

Proposed changes

  • Exclude entries from the review log table which have the REVLOG_RESCHED type when querying review data.

@RisingOrange RisingOrange changed the title fix: Exclude rescheduling entries when getting review count from review log table fix: Exclude rescheduling entries when getting review data Dec 27, 2023
@RisingOrange RisingOrange changed the base branch from main to fix/dont-attach-db-for-getting-review-data December 27, 2023 11:15
@RisingOrange RisingOrange marked this pull request as ready for review December 27, 2023 11:16
@RisingOrange RisingOrange changed the title fix: Exclude rescheduling entries when getting review data fix: Exclude entries for rescheduling cards when getting review data Dec 27, 2023
@RisingOrange RisingOrange deleted the branch fix/dont-attach-db-for-getting-review-data December 27, 2023 19:21
@RisingOrange RisingOrange deleted the fix/exclude-resched-entries-from-review-count branch January 2, 2024 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant