[PR #4243] [MERGED] enhance: add more action rule templating helpers #5279

Closed
opened 2026-02-28 21:09:42 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/4243
Author: @UnderKoen
Created: 1/26/2025
Status: Merged
Merged: 1/28/2025
Merged by: @UnderKoen

Base: masterHead: UnderKoen/more-helpers


📝 Commits (2)

  • f55b39b enhance: add more action rule templating helpers
  • bdd483d chore: note

📊 Changes

3 files changed (+120 additions, -7 deletions)

View changed files

📝 packages/loot-core/src/server/accounts/rules.test.ts (+39 -0)
📝 packages/loot-core/src/server/accounts/rules.ts (+75 -7)
upcoming-release-notes/4243.md (+6 -0)

📄 Description

Part of #3606

Adds the following helpers:

  • replace value pattern replacement mimics js replace. When pattern is not as /regex/flags it just uses raw value as opposed to {{regex ...
  • replaceAll value pattern replacement mimics js replaceAll
  • addDays date days add x days to the day
  • subDays date days
  • addWeeks date weeks
  • subWeeks date weeks
  • addMonths date months
  • subMonths date months
  • addYears date years
  • subYears date years
  • setDay date day Overflows are handled, 0 will set to last day of month before
  • concat args.. joins all arguments together

🔄 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/4243 **Author:** [@UnderKoen](https://github.com/UnderKoen) **Created:** 1/26/2025 **Status:** ✅ Merged **Merged:** 1/28/2025 **Merged by:** [@UnderKoen](https://github.com/UnderKoen) **Base:** `master` ← **Head:** `UnderKoen/more-helpers` --- ### 📝 Commits (2) - [`f55b39b`](https://github.com/actualbudget/actual/commit/f55b39bc7b6eb736cd5b45bf3fb5940aed8248d9) enhance: add more action rule templating helpers - [`bdd483d`](https://github.com/actualbudget/actual/commit/bdd483d7c6ecd56622a914b26a1a618e12256685) chore: note ### 📊 Changes **3 files changed** (+120 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `packages/loot-core/src/server/accounts/rules.test.ts` (+39 -0) 📝 `packages/loot-core/src/server/accounts/rules.ts` (+75 -7) ➕ `upcoming-release-notes/4243.md` (+6 -0) </details> ### 📄 Description Part of #3606 Adds the following helpers: - `replace value pattern replacement` mimics js replace. When pattern is not as `/regex/flags` it just uses raw value as opposed to `{{regex ...` - `replaceAll value pattern replacement` mimics js replaceAll - `addDays date days` add x days to the day - `subDays date days` - `addWeeks date weeks` - `subWeeks date weeks` - `addMonths date months` - `subMonths date months` - `addYears date years` - `subYears date years` - `setDay date day` Overflows are handled, 0 will set to last day of month before - `concat args..` joins all arguments together --- <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-02-28 21:09:42 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#5279