Files
actual/upcoming-release-notes
Stephen Brown II 94332016e8 Adds balance variable to rule templates (#5925)
* Adds balance variable to rule templates

Enables access to the account balance within rule templates. This allows for more complex rule creation based on the current account balance.

Calculates the account balance up to the transaction being processed, including transactions on the same date with lower sort order.

Handles cases where the balance is undefined gracefully, defaulting to 0 to prevent errors.

## AI disclaimer
This PR contains code that was partially or fully generated by AI and may contain errors. All suggestions for improvement are welcome.

* Add release notes

* indexed sql params not supported

* [autofix.ci] apply automated fixes

* Skip parent transactions of splits

* Uses aql for account balance

Updates transaction rule preparation to use aql instead of  sql calculating it from past transactions.

The balance is defaulted to 0 if no account is set.

Refactor account balance calculation to build a proper query with date and sort_order filters

* Add block scoping to switch cases and ensure correct fallthrough handling in Action type conversions

* Corrects transaction rule sorting order

Reverses the sort order comparison in transaction rules
to ensure correct identification of prior transactions with the same date.

This ensures that the correct balance is used when
calculating balance-based rule conditions.

fixup! Corrects transaction rule sorting order

* Improves transaction rule balance calculation

Uses a more efficient query for calculating the account balance
up to a transaction when applying rules, improving performance.
This change reduces the complexity of the balance calculation.

* Apply coderabbit lessons learned

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-10-18 08:22:55 -07:00
..
2025-10-07 14:36:10 -03:00
2025-10-05 14:22:42 +01:00
2025-10-05 14:36:57 +01:00
2025-10-05 14:22:02 +01:00
2025-10-06 08:41:59 -07:00
2025-10-08 22:20:29 +01:00
2025-10-06 16:28:04 +01:00
2025-10-06 17:32:42 +01:00
2025-10-07 17:50:41 +01:00
2025-10-07 08:28:38 -07:00
2025-10-07 14:45:13 -03:00
2025-10-08 23:21:37 +01:00
2025-10-08 21:01:27 +01:00
2025-10-08 21:16:34 +01:00
2025-10-09 22:55:48 +01:00
2025-10-10 19:59:20 +01:00
2025-10-10 19:58:59 +01:00
2025-10-13 19:04:32 +02:00
2025-10-18 16:34:41 +02:00
2025-10-16 18:59:19 +01:00
2025-10-16 16:22:48 +01:00
2025-10-18 11:46:52 +01:00

See the Writing Good Release Notes section of the README for the documentation repo for more information on how to create a release notes file here.