Skip to content

Expose and filter gallery o_counter (image o_counter sum)#6878

Open
slick-daddy wants to merge 1 commit intostashapp:developfrom
slick-daddy:codex/delete-all-branches-except-develop
Open

Expose and filter gallery o_counter (image o_counter sum)#6878
slick-daddy wants to merge 1 commit intostashapp:developfrom
slick-daddy:codex/delete-all-branches-except-develop

Conversation

@slick-daddy
Copy link
Copy Markdown
Contributor

Adds support for summing up image o_counter values across a gallery and lets you filter galleries based on that total.
Related #2836 and #6088

Description

  • Added an o_counter field to the Gallery GraphQL type and updated the UI fragments so you can actually query Gallery.o_counter.
  • Added OCounter to GalleryFilterType and wired up a filter handler (galleryOCounterCriterionHandler) that runs a SQL subquery to compute SUM(images.o_counter) per gallery, then applies integer criteria through the existing getIntCriterionWhereClause.
  • Added OCountByGalleryID to ImageStore, which grabs COALESCE(SUM(o_counter), 0) for images tied to a gallery. Also updated the ImageCounter interface and hooked up the galleryResolver.OCounter resolver to call it.
  • Updated the image reader/writer mocks to include OCountByGalleryID, and exposed o_counter as a filterable option in the UI list filters.

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