-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the ability to set a budget for a category #54
Conversation
@grablair in your observations have you noticed that the id for setting the budget is a different id from when you get a budget? I wasn't sure if I'm misunderstanding where the id comes from. I think get budget returns category ID. And setting a budget requires a budget item ID |
Oh, you may be right there. Good catch! I'll take a look at that sometime over the next day or two and make changes accordingly. |
Just did some investigating: In my tests for this PR, I used the ID The parameters for the
So I think the However, you are right that the budget item ID is different. The result I get for an "update_budget" is:
That budget item ID is definitely not a category ID. I checked on my categories setting page. I don't see the budget item ID actually used anywhere on first cursory glance. 🤷🏻♂️ cc: @Sean280ZX |
@grablair i agree in that budget item is is not being used. I was mixing up the query section and the variables. It appears that there are two possible variables to consider in the set budget mutation: categoryId and categoryGroupId. You need to use the categoryGroupId variable if you are doing group level budgeting (which I do). Can the set budget function be updated to handle either categoryId or categoryGroupId? |
Added category group support. cc: @Sean280ZX Test Results
|
@grablair changes looks/work well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @grablair!
Resolves #27
Resolves #28 (as a budget is "deleted" when its amount is set to
0
)Tested locally, and behavior is as expected.
Test Results