From 30a7482ddfa883faf5bd696dd3b619558ea38a73 Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Wed, 9 Nov 2022 11:06:11 +1100 Subject: [PATCH] Order saved filters by name (#3101) --- pkg/sqlite/saved_filter.go | 2 +- ui/v2.5/src/docs/en/Changelog/v0180.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/sqlite/saved_filter.go b/pkg/sqlite/saved_filter.go index 54fddcbc8..a00bd1048 100644 --- a/pkg/sqlite/saved_filter.go +++ b/pkg/sqlite/saved_filter.go @@ -100,7 +100,7 @@ func (qb *savedFilterQueryBuilder) FindMany(ctx context.Context, ids []int, igno func (qb *savedFilterQueryBuilder) FindByMode(ctx context.Context, mode models.FilterMode) ([]*models.SavedFilter, error) { // exclude empty-named filters - these are the internal default filters - query := fmt.Sprintf(`SELECT * FROM %s WHERE mode = ? AND name != ?`, savedFilterTable) + query := fmt.Sprintf(`SELECT * FROM %s WHERE mode = ? AND name != ? ORDER BY name ASC`, savedFilterTable) var ret models.SavedFilters if err := qb.query(ctx, query, []interface{}{mode, savedFilterDefaultName}, &ret); err != nil { diff --git a/ui/v2.5/src/docs/en/Changelog/v0180.md b/ui/v2.5/src/docs/en/Changelog/v0180.md index aca7cd077..70f9befbe 100644 --- a/ui/v2.5/src/docs/en/Changelog/v0180.md +++ b/ui/v2.5/src/docs/en/Changelog/v0180.md @@ -8,6 +8,7 @@ * Changed Performer height to be numeric, and changed filtering accordingly. ([#3060](https://github.com/stashapp/stash/pull/3060)) ### 🐛 Bug fixes +* Fixed Saved Filters not ordered by name. ([#3101](https://github.com/stashapp/stash/pull/3101)) * Scene Player no longer always resumes playing when seeking. ([#3020](https://github.com/stashapp/stash/pull/3020)) * Fixed space bar sometimes no playing/pausing the scene player. ([#3020](https://github.com/stashapp/stash/pull/3020)) * Fixed scrubber thumbnails not disappearing when seeking on mobile. ([#3020](https://github.com/stashapp/stash/pull/3020))