[PR #7631] [CLOSED] Fix Category Group filtering in Formula card report #56605

Closed
opened 2026-05-01 04:34:52 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/7631
Author: @vedparkasharya
Created: 4/26/2026
Status: Closed

Base: masterHead: fix/category-group-filter-formula-card


📝 Commits (1)

  • 58927f7 Fix category group filtering in Formula card report

📊 Changes

2 files changed (+52 additions, -14 deletions)

View changed files

📝 packages/desktop-client/src/hooks/useFormulaExecution.ts (+46 -14)
upcoming-release-notes/7625.md (+6 -0)

📄 Description

Summary

Adds Category Group filtering support to the Formula card report when using BUDGET_QUERY with query definitions, mirroring the fix previously applied to the Custom Report in #7628 and the Budget Analysis Report in #7116.

Problem

When adding a Category Group filter to a Query Definition in a Formula card report, BUDGET_QUERY would ignore it and return data for all categories instead. This happened because extractCategoryConditions in useFormulaExecution.ts only extracted category conditions, silently dropping category_group.

Solution

  1. Update extractCategoryConditions to include both category and category_group conditions
  2. Update getCategoriesFromConditions to accept category groups and evaluate category_group conditions by matching against cat.group (with support for text-based operators using group names)
  3. Update extractQueryCategories to fetch category groups via get-categories and pass them to the evaluator

This ensures BUDGET_QUERY and QUERY_EXTRACT_CATEGORIES correctly respect Category Group filters in formula query definitions.

Testing

  • Verified that category_group conditions now correctly restrict BUDGET_QUERY results
  • Existing category filters continue to work as before
  • No category conditions still includes all non-income, non-hidden categories

Fixes #7625


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/7631 **Author:** [@vedparkasharya](https://github.com/vedparkasharya) **Created:** 4/26/2026 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fix/category-group-filter-formula-card` --- ### 📝 Commits (1) - [`58927f7`](https://github.com/actualbudget/actual/commit/58927f7f48a73127dffe9d52d4611daa056e492a) Fix category group filtering in Formula card report ### 📊 Changes **2 files changed** (+52 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/hooks/useFormulaExecution.ts` (+46 -14) ➕ `upcoming-release-notes/7625.md` (+6 -0) </details> ### 📄 Description ## Summary Adds Category Group filtering support to the Formula card report when using BUDGET_QUERY with query definitions, mirroring the fix previously applied to the Custom Report in #7628 and the Budget Analysis Report in #7116. ## Problem When adding a Category Group filter to a Query Definition in a Formula card report, BUDGET_QUERY would ignore it and return data for all categories instead. This happened because `extractCategoryConditions` in `useFormulaExecution.ts` only extracted `category` conditions, silently dropping `category_group`. ## Solution 1. Update `extractCategoryConditions` to include both `category` and `category_group` conditions 2. Update `getCategoriesFromConditions` to accept category groups and evaluate `category_group` conditions by matching against `cat.group` (with support for text-based operators using group names) 3. Update `extractQueryCategories` to fetch category groups via `get-categories` and pass them to the evaluator This ensures `BUDGET_QUERY` and `QUERY_EXTRACT_CATEGORIES` correctly respect Category Group filters in formula query definitions. ## Testing - Verified that `category_group` conditions now correctly restrict BUDGET_QUERY results - Existing `category` filters continue to work as before - No category conditions still includes all non-income, non-hidden categories Fixes #7625 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-01 04:34:52 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#56605