[PR #2140] [MERGED] fix(quick-add-magic): prevent parsing partial keywords in words #3963

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

📋 Pull Request Information

Original PR: https://github.com/go-vikunja/vikunja/pull/2140
Author: @kolaente
Created: 1/23/2026
Status: Merged
Merged: 1/23/2026
Merged by: @kolaente

Base: mainHead: fix-quick-add-magic-partials


📝 Commits (2)

  • 06350a1 feat: add failing test cases
  • b6c344b fix(quick-add-magic): prevent parsing partial keywords in words

📊 Changes

2 files changed (+16 additions, -3 deletions)

View changed files

📝 frontend/src/helpers/time/parseDate.ts (+4 -2)
📝 frontend/src/modules/parseTaskText.test.ts (+12 -1)

📄 Description

Summary

  • Fixed date parser incorrectly extracting date components from within words
  • "Renovation - 2nd Floor Bath" no longer becomes "Reation - Floor Bath" with a due date of November 2nd

Changes

  • getMonthFromText now requires word boundaries, preventing "nov" from matching inside "Renovation" or "mar" inside "Remark"
  • getDayFromText now only matches ordinals when followed by end-of-string, time expressions, or month names, preventing "2nd Floor" from being parsed as a date

Test plan

  • Added failing test cases in previous commit
  • All 784 unit tests pass

References


🔄 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/2140 **Author:** [@kolaente](https://github.com/kolaente) **Created:** 1/23/2026 **Status:** ✅ Merged **Merged:** 1/23/2026 **Merged by:** [@kolaente](https://github.com/kolaente) **Base:** `main` ← **Head:** `fix-quick-add-magic-partials` --- ### 📝 Commits (2) - [`06350a1`](https://github.com/go-vikunja/vikunja/commit/06350a1135f3488481a42f59470a0f0070500377) feat: add failing test cases - [`b6c344b`](https://github.com/go-vikunja/vikunja/commit/b6c344b94e1607458ce0b2098c6d263f65f852ae) fix(quick-add-magic): prevent parsing partial keywords in words ### 📊 Changes **2 files changed** (+16 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/helpers/time/parseDate.ts` (+4 -2) 📝 `frontend/src/modules/parseTaskText.test.ts` (+12 -1) </details> ### 📄 Description ## Summary - Fixed date parser incorrectly extracting date components from within words - "Renovation - 2nd Floor Bath" no longer becomes "Reation - Floor Bath" with a due date of November 2nd ## Changes - `getMonthFromText` now requires word boundaries, preventing "nov" from matching inside "Renovation" or "mar" inside "Remark" - `getDayFromText` now only matches ordinals when followed by end-of-string, time expressions, or month names, preventing "2nd Floor" from being parsed as a date ## Test plan - [x] Added failing test cases in previous commit - [x] All 784 unit tests pass ## References - Forum discussion: https://community.vikunja.io/t/quick-add-magic-unintended-date-parsing/4259 --- <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:57:50 -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#3963