Skip to content

A local-first personal finance app

[Goals]: don't run templates in hidden groups (#2100)

youngcwb385c715efde
diff --git a/packages/loot-core/src/server/budget/goaltemplates.ts b/packages/loot-core/src/server/budget/goaltemplates.ts
index 45d8fcb4d8..6c71ee2a19 100644
--- a/packages/loot-core/src/server/budget/goaltemplates.ts
+++ b/packages/loot-core/src/server/budget/goaltemplates.ts
@@ -44,7 +44,12 @@ export function runCheckTemplates() {
async function getCategories() {
return await db.all(
- 'SELECT * FROM v_categories WHERE tombstone = 0 AND hidden = 0',
+ `
+ SELECT categories.* FROM categories
+ INNER JOIN category_groups on categories.cat_group = category_groups.id
+ WHERE categories.tombstone = 0 AND categories.hidden = 0
+ AND category_groups.hidden = 0
+ `,
);
}
diff --git a/upcoming-release-notes/2100.md b/upcoming-release-notes/2100.md
new file mode 100644
index 0000000000..228149363a
--- /dev/null
+++ b/upcoming-release-notes/2100.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [youngcw]
+---
+
+Goals: Don't run templates on non-hidden categories inside of hidden groups