[PR #4575] [MERGED] Issue 4540 New SortBy Options: Started Date & Finished Date #4291

Closed
opened 2026-04-25 00:19:09 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/4575
Author: @tagmeh
Created: 8/11/2025
Status: Merged
Merged: 8/24/2025
Merged by: @advplyr

Base: masterHead: Issue-4540-SortBy-StartedDate-and-FinishedDate


📝 Commits (10+)

  • 42eb4e3 Feature mostly implemented, has UI/CSS bug, not super DRY, no tests.
  • 6edfcfb Merge branch 'master' of https://github.com/tagmeh/audiobookshelf
  • 3cdf16e Merge branch 'advplyr:master' into master
  • 093be36 Merge branch 'advplyr:master' into master
  • 28d98b4 Merge branch 'advplyr:master' into master
  • c023f02 SortBy Options: Started Date & Finished Date implemented. English-only strings
  • 6569363 Removed Cover.cy.js
  • fe55002 Manually removed changes that should not have been included in this PR.
  • d27185e Removed extra newlines.
  • f6b922f Fix book card started/finished sort option to use formatDatetime

📊 Changes

4 files changed (+37 additions, -5 deletions)

View changed files

📝 client/components/cards/LazyBookCard.vue (+16 -0)
📝 client/components/controls/LibrarySortSelect.vue (+9 -1)
📝 client/strings/en-us.json (+4 -0)
📝 server/utils/queries/libraryItemsBookFilters.js (+8 -4)

📄 Description

Brief summary

Adds two sort options: "Started Date" and "Finished Date"

Which issue is fixed?

Fixes #4540

In-depth Description

This PR adds the two sort options "Started Date" and "Finished Date" to the sort dropdown. The changes are similar to https://github.com/advplyr/audiobookshelf/pull/4542.

Books are sorted by if they have a startedDate (createdAt) or finishDate (finishAt) value first, then everything else, then ascending or descending. This keeps books with values at the top of the page and avoids requiring the user to scroll to the bottom, passed books they haven't started/finished in order to see the reversed sort. An attempt was made to show the date + time, but I guess the time isn't kept for these fields.

How have you tested this?

Manually tested, see screenshots.

Screenshots

Sort Options:
Started Date Asc
image

Started Date Desc
image

Finished Date Asc
image

Finished Date Desc
image

Filters + Sort Options:
Progress.In-Progress + Started Date
image

Progress.In-Progress + Finished Date
image

Progress.Finished + Started Date
image

Progress.Finished + Finished Date
image


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/4575 **Author:** [@tagmeh](https://github.com/tagmeh) **Created:** 8/11/2025 **Status:** ✅ Merged **Merged:** 8/24/2025 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `Issue-4540-SortBy-StartedDate-and-FinishedDate` --- ### 📝 Commits (10+) - [`42eb4e3`](https://github.com/advplyr/audiobookshelf/commit/42eb4e3f0411b16146dc27b65fb55b9c0afbd069) Feature mostly implemented, has UI/CSS bug, not super DRY, no tests. - [`6edfcfb`](https://github.com/advplyr/audiobookshelf/commit/6edfcfb271573dad415e47c60a6a7dc0d6d14893) Merge branch 'master' of https://github.com/tagmeh/audiobookshelf - [`3cdf16e`](https://github.com/advplyr/audiobookshelf/commit/3cdf16e86fdd0da17c4077917d74821177da7f4b) Merge branch 'advplyr:master' into master - [`093be36`](https://github.com/advplyr/audiobookshelf/commit/093be36192acaf437dec980729103f732a7dd120) Merge branch 'advplyr:master' into master - [`28d98b4`](https://github.com/advplyr/audiobookshelf/commit/28d98b4dbce8709c955529ce70caf10f39c34506) Merge branch 'advplyr:master' into master - [`c023f02`](https://github.com/advplyr/audiobookshelf/commit/c023f029d7c34c571f3dc5c133da1999d4664431) SortBy Options: Started Date & Finished Date implemented. English-only strings - [`6569363`](https://github.com/advplyr/audiobookshelf/commit/656936378eb493a478513583ee0d76129667c424) Removed Cover.cy.js - [`fe55002`](https://github.com/advplyr/audiobookshelf/commit/fe55002f84b471b6cc0d8b153d78f4786a80d683) Manually removed changes that should not have been included in this PR. - [`d27185e`](https://github.com/advplyr/audiobookshelf/commit/d27185e8cbb4915b23e8d0dc196982afec78a00f) Removed extra newlines. - [`f6b922f`](https://github.com/advplyr/audiobookshelf/commit/f6b922fe8d4ca6e13de1b76b08d4ed7ec7312bea) Fix book card started/finished sort option to use formatDatetime ### 📊 Changes **4 files changed** (+37 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `client/components/cards/LazyBookCard.vue` (+16 -0) 📝 `client/components/controls/LibrarySortSelect.vue` (+9 -1) 📝 `client/strings/en-us.json` (+4 -0) 📝 `server/utils/queries/libraryItemsBookFilters.js` (+8 -4) </details> ### 📄 Description <!-- For Work In Progress Pull Requests, please use the Draft PR feature, see https://github.blog/2019-02-14-introducing-draft-pull-requests/ for further details. If you do not follow this template, the PR may be closed without review. Please ensure all checks pass. If you are a new contributor, the workflows will need to be manually approved before they run. --> ## Brief summary Adds two sort options: "Started Date" and "Finished Date" ## Which issue is fixed? Fixes #4540 ## In-depth Description This PR adds the two sort options "Started Date" and "Finished Date" to the sort dropdown. The changes are similar to https://github.com/advplyr/audiobookshelf/pull/4542. Books are sorted by if they have a startedDate (createdAt) or finishDate (finishAt) value first, then everything else, then ascending or descending. This keeps books with values at the top of the page and avoids requiring the user to scroll to the bottom, passed books they haven't started/finished in order to see the reversed sort. An attempt was made to show the date + time, but I guess the time isn't kept for these fields. ## How have you tested this? Manually tested, see screenshots. ## Screenshots Sort Options: Started Date Asc <img width="550" height="381" alt="image" src="https://github.com/user-attachments/assets/e0184da4-7c4c-4327-a951-bf77ff976733" /> Started Date Desc <img width="547" height="382" alt="image" src="https://github.com/user-attachments/assets/e670d8e5-f58c-47c8-995e-17677341077b" /> Finished Date Asc <img width="554" height="378" alt="image" src="https://github.com/user-attachments/assets/94125e28-757d-4e97-9d50-e3ff292d0754" /> Finished Date Desc <img width="552" height="382" alt="image" src="https://github.com/user-attachments/assets/034d303f-37c9-4b3b-a189-57210fb2e805" /> Filters + Sort Options: Progress.In-Progress + Started Date <img width="554" height="225" alt="image" src="https://github.com/user-attachments/assets/6cd84cab-1b90-4c00-9ac0-2002416bc66d" /> Progress.In-Progress + Finished Date <img width="561" height="223" alt="image" src="https://github.com/user-attachments/assets/eb94113d-600e-434c-978e-d58cd52e3d1e" /> Progress.Finished + Started Date <img width="556" height="385" alt="image" src="https://github.com/user-attachments/assets/aefb620c-18f4-4065-9560-52664af6eea6" /> Progress.Finished + Finished Date <img width="553" height="386" alt="image" src="https://github.com/user-attachments/assets/be926cee-bb93-4967-b3c5-f5f76a741645" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:19:09 +02:00
adam closed this issue 2026-04-25 00:19:09 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#4291