[PR #6645] [MERGED] fix HyperFormula custom functions and add FIXED formula #41078

Closed
opened 2026-04-23 13:53:02 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/6645
Author: @matt-fidd
Created: 1/14/2026
Status: Merged
Merged: 1/19/2026
Merged by: @matt-fidd

Base: masterHead: fixed-formula


📝 Commits (4)

📊 Changes

7 files changed (+67 additions, -4 deletions)

View changed files

📝 packages/desktop-client/src/components/formula/codeMirror-excelLanguage.tsx (+1 -0)
📝 packages/desktop-client/src/components/formula/queryModeFunctions.ts (+8 -0)
📝 packages/desktop-client/src/components/formula/transactionModeFunctions.ts (+8 -0)
📝 packages/desktop-client/src/hooks/useFormulaExecution.ts (+3 -1)
📝 packages/loot-core/src/server/rules/action.ts (+12 -3)
📝 packages/loot-core/src/server/rules/customFunctions.ts (+29 -0)
upcoming-release-notes/6645.md (+6 -0)

📄 Description

This PR is double barrelled, when adding FIXED I found that the custom functions weren't working at all because there were no translations defined. I cleaned that up and forced the language to US (default is enGB) first. They're actually equivalent but it makes sense to keep ourselves consistent and use US

https://github.com/handsontable/hyperformula/blob/master/src/i18n/languages/enUS.ts

Error before this PR:

index.ts:26 Formula execution error: Error: Formula error: Function name INTEGER_TO_AMOUNT not recognized.
    at Action.executeFormulaSync (action.ts:307:15)
    at Action.exec (action.ts:89:33)
    at rule.ts:16:36
    at Array.forEach (<anonymous>)
    at execNonSplitActions (rule.ts:16:11)
    at execActions (rule.ts:98:26)
    at transaction-rules.ts:706:31
    at Array.flatMap (<anonymous>)
    at applyActions (transaction-rules.ts:705:40)

🔄 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/6645 **Author:** [@matt-fidd](https://github.com/matt-fidd) **Created:** 1/14/2026 **Status:** ✅ Merged **Merged:** 1/19/2026 **Merged by:** [@matt-fidd](https://github.com/matt-fidd) **Base:** `master` ← **Head:** `fixed-formula` --- ### 📝 Commits (4) - [`aa6f209`](https://github.com/actualbudget/actual/commit/aa6f2095c63385d8da51277f01fe275cc7291045) fix custom HyperFormula functions - [`140522a`](https://github.com/actualbudget/actual/commit/140522a42b866d7e681091dfabe002091ca14c24) add FIXED formula - [`c1824d6`](https://github.com/actualbudget/actual/commit/c1824d6b892e07934452911fdf701b73566ba425) note - [`8c60a7e`](https://github.com/actualbudget/actual/commit/8c60a7e929ded88ba6525b0b972f084cdbab7d4c) [autofix.ci] apply automated fixes ### 📊 Changes **7 files changed** (+67 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/formula/codeMirror-excelLanguage.tsx` (+1 -0) 📝 `packages/desktop-client/src/components/formula/queryModeFunctions.ts` (+8 -0) 📝 `packages/desktop-client/src/components/formula/transactionModeFunctions.ts` (+8 -0) 📝 `packages/desktop-client/src/hooks/useFormulaExecution.ts` (+3 -1) 📝 `packages/loot-core/src/server/rules/action.ts` (+12 -3) 📝 `packages/loot-core/src/server/rules/customFunctions.ts` (+29 -0) ➕ `upcoming-release-notes/6645.md` (+6 -0) </details> ### 📄 Description This PR is double barrelled, when adding `FIXED` I found that the custom functions weren't working at all because there were no translations defined. I cleaned that up and forced the language to US (default is enGB) first. They're actually equivalent but it makes sense to keep ourselves consistent and use US https://github.com/handsontable/hyperformula/blob/master/src/i18n/languages/enUS.ts Error before this PR: ``` index.ts:26 Formula execution error: Error: Formula error: Function name INTEGER_TO_AMOUNT not recognized. at Action.executeFormulaSync (action.ts:307:15) at Action.exec (action.ts:89:33) at rule.ts:16:36 at Array.forEach (<anonymous>) at execNonSplitActions (rule.ts:16:11) at execActions (rule.ts:98:26) at transaction-rules.ts:706:31 at Array.flatMap (<anonymous>) at applyActions (transaction-rules.ts:705:40) ``` --- <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-04-23 13:53:02 -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#41078