Skip to content

[Nightly] Library filter counts are capped by the first 100 books instead of total books per library #469

@zachyale

Description

@zachyale

What Went Wrong?

The library filter options appear to be calculated from only the first 100 books returned, instead of from the full matching dataset. This causes the counts shown in the filter options to be much lower than the actual number of books in each library.

Example shown in the Libraries filter:

  • ebooks (92)
  • documents (3)
  • comics (5)

In this case, we have more than 100 ebooks, more than 3 documents and more than 5 comics. This bug likely applies to all filters and not just library filters

How Can We Reproduce This?

  1. Open a Grimmory instance with more than 100 total books across multiple libraries.
  2. Make sure one or more libraries have counts that exceed the values shown in the first 100 returned books.
  3. Go to the all books view
  4. Open the library filters.
  5. Compare the displayed library option counts against the actual number of books in each library.

What Should Have Happened?

The filter option counts should reflect the full number of books in each library. Only the number of filter options per category should be capped to 100 if needed, not the dataset used to calculate each option’s count.

Screenshots or Error Messages (Optional)

Stable:
Image

Nightly:
Image

Any Ideas on How to Fix This? (Optional)

No response

Your Setup

  • Grimmory Nightly

Before Submitting

  • I've searched existing issues and confirmed this bug hasn't been reported yet

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions