[PR #1647] [MERGED] fix(filters): support project filter in parentheses #3569

Closed
opened 2026-03-22 14:47:51 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-vikunja/vikunja/pull/1647
Author: @kolaente
Created: 10/13/2025
Status: Merged
Merged: 10/13/2025
Merged by: @kolaente

Base: mainHead: fix/project-filter-parentheses


📝 Commits (1)

  • a790d00 fix(filters): support project filter in parentheses

📊 Changes

3 files changed (+48 additions, -1 deletions)

View changed files

📝 frontend/src/helpers/filters.test.ts (+20 -0)
📝 frontend/src/helpers/filters.ts (+1 -1)
📝 pkg/models/task_collection_filter_test.go (+27 -0)

📄 Description

The filter regex pattern was not matching values inside parentheses correctly. The lookahead pattern only allowed &&, ||, or end-of-string after filter values, but when filters are wrapped in parentheses like ( project = Filtertest ), the closing ) appears after the value.

Fixed by adding \) to the lookahead pattern so it correctly handles closing parentheses. This allows the project filter (and other filters) to work properly when nested in parentheses.

  • Added tests for project filters in parentheses (both frontend and backend)
  • Backend tests confirm the backend already handled this correctly
  • Frontend regex pattern now matches the backend behavior

Fixes #1645


🔄 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/go-vikunja/vikunja/pull/1647 **Author:** [@kolaente](https://github.com/kolaente) **Created:** 10/13/2025 **Status:** ✅ Merged **Merged:** 10/13/2025 **Merged by:** [@kolaente](https://github.com/kolaente) **Base:** `main` ← **Head:** `fix/project-filter-parentheses` --- ### 📝 Commits (1) - [`a790d00`](https://github.com/go-vikunja/vikunja/commit/a790d0075d1dea60d027200629b0705455c1f199) fix(filters): support project filter in parentheses ### 📊 Changes **3 files changed** (+48 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/helpers/filters.test.ts` (+20 -0) 📝 `frontend/src/helpers/filters.ts` (+1 -1) 📝 `pkg/models/task_collection_filter_test.go` (+27 -0) </details> ### 📄 Description The filter regex pattern was not matching values inside parentheses correctly. The lookahead pattern only allowed `&&`, `||`, or end-of-string after filter values, but when filters are wrapped in parentheses like `( project = Filtertest )`, the closing `)` appears after the value. Fixed by adding `\)` to the lookahead pattern so it correctly handles closing parentheses. This allows the project filter (and other filters) to work properly when nested in parentheses. - Added tests for project filters in parentheses (both frontend and backend) - Backend tests confirm the backend already handled this correctly - Frontend regex pattern now matches the backend behavior Fixes #1645 --- <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-03-22 14:47:51 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#3569