[Bug]: Lower priorities allocated before higher #2480

Closed
opened 2026-02-28 20:15:02 -06:00 by GiteaMirror · 10 comments
Owner

Originally created by @cavazos-apps on GitHub (Sep 17, 2025).

Verified issue does not already exist?

  • I have searched and found no existing issue

What happened?

I have multiple tiers of priorities for categories. 0, 1, 2, 3, 10, 20, 30, 40. 0 and 1 are being fully funded but #template-20 appears to be getting funded before #template-2. I have severial #template-10 with no funding but several #template-20 with funds, even before #template-3 categories.

How can we reproduce the issue?

Set up multiple tiers of priorities, partially fund the month, overwrite with budget template

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

Firefox, Chrome, Safari

Operating System

Mac OSX

Originally created by @cavazos-apps on GitHub (Sep 17, 2025). ### Verified issue does not already exist? - [x] I have searched and found no existing issue ### What happened? I have multiple tiers of priorities for categories. 0, 1, 2, 3, 10, 20, 30, 40. 0 and 1 are being fully funded but `#template-20` appears to be getting funded before `#template-2`. I have severial `#template-10` with no funding but several `#template-20` with funds, even before `#template-3` categories. ### How can we reproduce the issue? Set up multiple tiers of priorities, partially fund the month, overwrite with budget template ### Where are you hosting Actual? Docker ### What browsers are you seeing the problem on? Firefox, Chrome, Safari ### Operating System Mac OSX
GiteaMirror added the needs infobug labels 2026-02-28 20:15:02 -06:00
Author
Owner

@youngcw commented on GitHub (Sep 17, 2025):

What version are you on? Do you have an example file that I could test with?

@youngcw commented on GitHub (Sep 17, 2025): What version are you on? Do you have an example file that I could test with?
Author
Owner

@cavazos-apps commented on GitHub (Sep 17, 2025):

App: v25.9.0 | Server v25.9.0

Is there a recommended way to provide my files without sensitive info? I've got quite a few categories and not sure what's causing it as I tried in a blank budget with only a couple and couldn't replicate.

@cavazos-apps commented on GitHub (Sep 17, 2025): App: v25.9.0 | Server v25.9.0 Is there a recommended way to provide my files without sensitive info? I've got quite a few categories and not sure what's causing it as I tried in a blank budget with only a couple and couldn't replicate.
Author
Owner

@youngcw commented on GitHub (Sep 17, 2025):

Make an example in edge.actualbudget.org then export it then upload it here. That way there isn't any personal data in the example.

@youngcw commented on GitHub (Sep 17, 2025): Make an example in edge.actualbudget.org then export it then upload it here. That way there isn't any personal data in the example.
Author
Owner

@cavazos-apps commented on GitHub (Sep 17, 2025):

I don't seem to be able to easily reproduce without building out a much larger budget. Could it perhaps be related to importing from YNAB and not starting fresh? I've even zeroed out the budget and re-overwritten and still seeing strange results.

@cavazos-apps commented on GitHub (Sep 17, 2025): I don't seem to be able to easily reproduce without building out a much larger budget. Could it perhaps be related to importing from YNAB and not starting fresh? I've even zeroed out the budget and re-overwritten and still seeing strange results.
Author
Owner

@youngcw commented on GitHub (Sep 17, 2025):

It shouldn't matter where the budget came from. The templates only look at your to budget and sometimes category balances. Are any of your templates budgeting a negative amount? That could cause what you are seeing.

@youngcw commented on GitHub (Sep 17, 2025): It shouldn't matter where the budget came from. The templates only look at your to budget and sometimes category balances. Are any of your templates budgeting a negative amount? That could cause what you are seeing.
Author
Owner

@cavazos-apps commented on GitHub (Sep 17, 2025):

Just as a sanity check

Image Image

Are any of your templates budgeting a negative amount?

No, I have no negative values in any templating, either in priority or amount.

@cavazos-apps commented on GitHub (Sep 17, 2025): Just as a sanity check <img width="683" height="71" alt="Image" src="https://github.com/user-attachments/assets/7dd925c5-2b7b-4dbf-807f-c825b4c37492" /> <img width="676" height="67" alt="Image" src="https://github.com/user-attachments/assets/6193c5e4-f80e-41d7-8355-3b4498fba2f8" /> > Are any of your templates budgeting a negative amount? No, I have no negative values in any templating, either in priority or amount.
Author
Owner

@youngcw commented on GitHub (Sep 17, 2025):

Just as a sanity check

Image Image

Are any of your templates budgeting a negative amount?

No, I have no negative values in any templating, either in priority or amount.

But did any of the budget amounts come out negative? Some templates have the potential to remove funds from the categories even if they are requesting positive funds. Your limit example could remove funds

@youngcw commented on GitHub (Sep 17, 2025): > Just as a sanity check > > <img alt="Image" width="683" height="71" src="https://private-user-images.githubusercontent.com/46500116/490347932-7dd925c5-2b7b-4dbf-807f-c825b4c37492.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTgwODIyODAsIm5iZiI6MTc1ODA4MTk4MCwicGF0aCI6Ii80NjUwMDExNi80OTAzNDc5MzItN2RkOTI1YzUtMmI3Yi00ZGJmLTgwN2YtYzgyNWI0YzM3NDkyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA5MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwOTE3VDA0MDYyMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTEyZmNlMWY4MGQwYmUwYzBkY2JiNjczODE3OTcyNTJmOTYxNWZiNzEzNmEzNDcwYTliNmQyMGFhZDBiNWMzMTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.OqlIGWlCyT9auH1U44EBBfFEt8B28DhiNJann0ht2FM"> <img alt="Image" width="676" height="67" src="https://private-user-images.githubusercontent.com/46500116/490348274-6193c5e4-f80e-41d7-8355-3b4498fba2f8.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTgwODIyODAsIm5iZiI6MTc1ODA4MTk4MCwicGF0aCI6Ii80NjUwMDExNi80OTAzNDgyNzQtNjE5M2M1ZTQtZjgwZS00MWQ3LTgzNTUtM2I0NDk4ZmJhMmY4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA5MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwOTE3VDA0MDYyMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFmZjI4MmEyMTgyNjg2OWU1M2NhZjlmNmMxYzljZDRjN2U3ZDBhMzg2NzE0ZjQ5ZGYwZmViZGQyYzBlZjk2MTcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.r2y9tKku7nRb7TUg8GU2yQYpyU4va28odoYCHxGmQDE"> > > Are any of your templates budgeting a negative amount? > > No, I have no negative values in any templating, either in priority or amount. But did any of the budget amounts come out negative? Some templates have the potential to remove funds from the categories even if they are requesting positive funds. Your limit example could remove funds
Author
Owner

@cavazos-apps commented on GitHub (Sep 17, 2025):

Ah, yes! There was one overspent category that should have been covered by another that must have not carried over resulting in the template subtracting a large sum, that seems to have fixed the issue as long as following covering the overspending, I apply templates and not overwrite with templates. I assume when the month rolls over that should be a non-issue?

@cavazos-apps commented on GitHub (Sep 17, 2025): Ah, yes! There was _one_ overspent category that should have been covered by another that must have not carried over resulting in the template subtracting a large sum, that seems to have fixed the issue as long as following covering the overspending, I **apply templates** and not **overwrite with templates**. I assume when the month rolls over that should be a non-issue?
Author
Owner

@youngcw commented on GitHub (Sep 17, 2025):

I don't quite follow. It's best to run templates at the beginning of the month then if you overspend you manually fix it as needed.

@youngcw commented on GitHub (Sep 17, 2025): I don't quite follow. It's best to run templates at the beginning of the month then if you overspend you manually fix it as needed.
Author
Owner

@cavazos-apps commented on GitHub (Sep 17, 2025):

Yeah makes sense. Just spun up an instance today to try it out. I expect the issue came from trying to template partially through the month. Thanks for the help.

@cavazos-apps commented on GitHub (Sep 17, 2025): Yeah makes sense. Just spun up an instance today to try it out. I expect the issue came from trying to template partially through the month. Thanks for the help.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#2480