-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Relax yearly already-read page query #8596
Conversation
Fixes yearly already-read reading log by showing books with checkins that have since been moved to other shelves, e.g. a book that was marked as read but then moved to e.g. "Already Read" or "Currently Reading"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah this is causing a bug; see https://testing.openlibrary.org/people/ScarTissue/books/already-read/year/2022
I haven't read the deep learning book. And it doesn't appear to have a check in? I'm not sure why it appears there...
@@ -383,8 +383,7 @@ def get_sorted_reading_log_books( | |||
FROM bookshelves_books b | |||
INNER JOIN bookshelves_events e | |||
ON b.work_id = e.work_id AND b.username = e.username | |||
WHERE b.bookshelf_id = $bookshelf_id | |||
AND b.username = $username | |||
WHERE b.username = $username | |||
AND e.event_date LIKE $checkin_year || '%' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we maybe filter by a certain check-in type?
openlibrary/openlibrary/core/bookshelves_events.py
Lines 6 to 9 in 68a5584
class BookshelfEvent(IntEnum): | |
START = 1 | |
UPDATE = 2 | |
FINISH = 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are all FINISH
. The other ones are there to support multiple check-ins per work, and are not used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah not a bug! @jimchamp found the issue! Looks like I had a funny case where that book contained a START event , which I don't think we use anymore. Must've been a testing thing!
Fixes yearly already-read reading log by showing books with checkins that have since been moved to other shelves, e.g. a book that was marked as read but then moved to e.g. "Already Read" or "Currently Reading"
Technical
Testing
Screenshot
Stakeholders