[Bug]: Template "% of previous" + "up to" doesn't work, but passes validation #1008

Closed
opened 2026-02-28 19:28:11 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @kymckay on GitHub (Mar 28, 2024).

Verified issue does not already exist?

  • I have searched and found no existing issue
  • I have checked my server logs and could not see any errors there
  • I will be attaching my server logs to this issue
  • I will be attaching my client-side (browser) logs to this issue
  • I understand that this issue will be automatically closed if insufficient information is provided

What happened?

#template 15% of previous Salary up to 20000

This template doesn't work as expected, it always adds 0 to the category even though it's below the value of 20000. However, it passes validation just fine. Haven't looked at the code, but perhaps it's interpreting all of "Salary up to 20000" as the category to pull from (which doesn't exist).

Use case: For something like an emergency fund. There's also a possible templates feature gap here where once you hit a limit you want the same percentage to go to Savings instead.

What error did you receive?

No response

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

Firefox

Operating System

Linux

Originally created by @kymckay on GitHub (Mar 28, 2024). ### Verified issue does not already exist? - [X] I have searched and found no existing issue ### Is this related to GoCardless, Simplefin or another bank-sync provider? - [ ] I have checked my server logs and could not see any errors there - [ ] I will be attaching my server logs to this issue - [ ] I will be attaching my client-side (browser) logs to this issue - [X] I understand that this issue will be automatically closed if insufficient information is provided ### What happened? ```#template 15% of previous Salary up to 20000``` This template doesn't work as expected, it always adds 0 to the category even though it's below the value of 20000. However, it passes validation just fine. Haven't looked at the code, but perhaps it's interpreting all of "Salary up to 20000" as the category to pull from (which doesn't exist). Use case: For something like an emergency fund. There's also a possible templates feature gap here where once you hit a limit you want the same percentage to go to Savings instead. ### What error did you receive? _No response_ ### Where are you hosting Actual? Docker ### What browsers are you seeing the problem on? Firefox ### Operating System Linux
GiteaMirror added the bug label 2026-02-28 19:28:11 -06:00
Author
Owner

@youngcw commented on GitHub (Mar 28, 2024):

I think that is because "Salary up to 20000" is getting parsed as a category name. Since category names are allowed to have white space, names always are just the rest of the line.

@youngcw commented on GitHub (Mar 28, 2024): I think that is because "Salary up to 20000" is getting parsed as a category name. Since category names are allowed to have white space, names always are just the rest of the line.
Author
Owner

@youngcw commented on GitHub (Mar 29, 2024):

I think if you want that functionality to work you need to make the "up to" its own template.

@youngcw commented on GitHub (Mar 29, 2024): I think if you want that functionality to work you need to make the "up to" its own template.
Author
Owner

@youngcw commented on GitHub (Apr 2, 2024):

Im closing this since its not really a bug.

@youngcw commented on GitHub (Apr 2, 2024): Im closing this since its not really a bug.
Author
Owner

@kymckay commented on GitHub (Apr 2, 2024):

Fair, but I do think there's a UX issue here. If the category doesn't exist then the template probably shouldn't pass validation.

@kymckay commented on GitHub (Apr 2, 2024): Fair, but I do think there's a UX issue here. If the category doesn't exist then the template probably shouldn't pass validation.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#1008