diff --git a/graphql/schema/types/filters.graphql b/graphql/schema/types/filters.graphql index 850d46ad9..c2dcc75f6 100644 --- a/graphql/schema/types/filters.graphql +++ b/graphql/schema/types/filters.graphql @@ -286,6 +286,9 @@ input TagFilterType { """Filter by tag aliases""" aliases: StringCriterionInput + """Filter by tag description""" + description: StringCriterionInput + """Filter to only include tags missing this property""" is_missing: String diff --git a/pkg/models/tag.go b/pkg/models/tag.go index 57b9f55d5..5a98fe676 100644 --- a/pkg/models/tag.go +++ b/pkg/models/tag.go @@ -10,6 +10,8 @@ type TagFilterType struct { Name *StringCriterionInput `json:"name"` // Filter by tag aliases Aliases *StringCriterionInput `json:"aliases"` + // Filter by tag description + Description *StringCriterionInput `json:"description"` // Filter to only include tags missing this property IsMissing *string `json:"is_missing"` // Filter by number of scenes with this tag diff --git a/pkg/sqlite/tag.go b/pkg/sqlite/tag.go index 922c8f41d..abedc403b 100644 --- a/pkg/sqlite/tag.go +++ b/pkg/sqlite/tag.go @@ -324,6 +324,8 @@ func (qb *tagQueryBuilder) makeFilter(ctx context.Context, tagFilter *models.Tag query.handleCriterion(ctx, stringCriterionHandler(tagFilter.Name, tagTable+".name")) query.handleCriterion(ctx, tagAliasCriterionHandler(qb, tagFilter.Aliases)) + + query.handleCriterion(ctx, stringCriterionHandler(tagFilter.Description, tagTable+".description")) query.handleCriterion(ctx, boolCriterionHandler(tagFilter.IgnoreAutoTag, tagTable+".ignore_auto_tag", nil)) query.handleCriterion(ctx, tagIsMissingCriterionHandler(qb, tagFilter.IsMissing)) diff --git a/ui/v2.5/src/components/Changelog/Changelog.tsx b/ui/v2.5/src/components/Changelog/Changelog.tsx index 24e5cee5f..22d6ed640 100644 --- a/ui/v2.5/src/components/Changelog/Changelog.tsx +++ b/ui/v2.5/src/components/Changelog/Changelog.tsx @@ -22,6 +22,7 @@ import V0150 from "src/docs/en/Changelog/v0150.md"; import V0160 from "src/docs/en/Changelog/v0160.md"; import V0161 from "src/docs/en/Changelog/v0161.md"; import V0170 from "src/docs/en/Changelog/v0170.md"; +import V0180 from "src/docs/en/Changelog/v0180.md"; import { MarkdownPage } from "../Shared/MarkdownPage"; // to avoid use of explicit any @@ -60,9 +61,9 @@ const Changelog: React.FC = () => { // after new release: // add entry to releases, using the current* fields // then update the current fields. - const currentVersion = stashVersion || "v0.17.0"; + const currentVersion = stashVersion || "v0.18.0"; const currentDate = buildDate; - const currentPage = V0170; + const currentPage = V0180; const releases: IStashRelease[] = [ { @@ -71,6 +72,11 @@ const Changelog: React.FC = () => { page: currentPage, defaultOpen: true, }, + { + version: "v0.17.2", + date: "2022-10-25", + page: V0170, + }, { version: "v0.16.1", date: "2022-07-26", diff --git a/ui/v2.5/src/docs/en/Changelog/v0180.md b/ui/v2.5/src/docs/en/Changelog/v0180.md new file mode 100644 index 000000000..bea6f15f3 --- /dev/null +++ b/ui/v2.5/src/docs/en/Changelog/v0180.md @@ -0,0 +1,2 @@ +### ✨ New Features +* Added tag description filter criterion. ([#3011](https://github.com/stashapp/stash/pull/3011)) diff --git a/ui/v2.5/src/models/list-filter/criteria/factory.ts b/ui/v2.5/src/models/list-filter/criteria/factory.ts index 55d3a3991..8fac6613a 100644 --- a/ui/v2.5/src/models/list-filter/criteria/factory.ts +++ b/ui/v2.5/src/models/list-filter/criteria/factory.ts @@ -161,6 +161,7 @@ export function makeCriteria(type: CriterionType = "none") { case "title": case "director": case "synopsis": + case "description": return new StringCriterion(new StringCriterionOption(type, type)); case "interactive": return new InteractiveCriterion(); diff --git a/ui/v2.5/src/models/list-filter/tags.ts b/ui/v2.5/src/models/list-filter/tags.ts index 7ab794509..468627a77 100644 --- a/ui/v2.5/src/models/list-filter/tags.ts +++ b/ui/v2.5/src/models/list-filter/tags.ts @@ -44,6 +44,7 @@ const criterionOptions = [ createMandatoryStringCriterionOption("name"), TagIsMissingCriterionOption, createStringCriterionOption("aliases"), + createStringCriterionOption("description"), createBooleanCriterionOption("ignore_auto_tag"), createMandatoryNumberCriterionOption("scene_count"), createMandatoryNumberCriterionOption("image_count"), diff --git a/ui/v2.5/src/models/list-filter/types.ts b/ui/v2.5/src/models/list-filter/types.ts index 46313a314..fda8dce87 100644 --- a/ui/v2.5/src/models/list-filter/types.ts +++ b/ui/v2.5/src/models/list-filter/types.ts @@ -124,4 +124,5 @@ export type CriterionType = | "performer_age" | "duplicated" | "ignore_auto_tag" - | "file_count"; + | "file_count" + | "description";