actual
actual copied to clipboard
[Feedback]: Split in Rules
Feedback for the experimental Split in rules feature.
@jfdoming I noticed that we can split transactions in rules on all stages (Pre, Default, Post). Does it make sense to just allow a split on Post
? This way, we can probably get rid of the Before split
functionality. The Post
split rule will apply the split on whatever the result of the Pre
and Default
stages is.
I think it would make sense to block setting the category in the "before split" part of a split rule. Currently it can be set, but does nothing. Maybe pass that on to the splits if its set there?
I think it would make sense to block setting the category in the "before split" part of a split rule. Currently it can be set, but does nothing. Maybe pass that on to the splits if its set there?
Hmm, so the "Before split" bit was because I wasn't sure what to do if you (1) add some actions to a non-split rule, and then (2) split the rule; and also it was supposed to be a way to apply actions across all splits. If setting the category doesn't work (I'll check and investigate why) that seems like something that should be fixed, but I'm curious if you have other ideas on how this could behave.
Thanks for the feedback btw!
👋 Im having trouble getting the split rule to apply when importing a transaction via the api.
I have tried importing via a file and works, however I can't seem to get it working with the api. Hoping you can help confirm if it's a me thing or if there is some functionality missing.
Example code using the api
...
const accountId = '04bbaabb-5a1e-418b-abe4-678493f67043'
const transaction = {
"account": "33644b5c-fcfd-4580-9056-a28278835fb8",
"date": "2024-03-25",
"payee_name": "New World",
"amount": 54500,
"notes": "test"
}
await api.importTransactions(accountId, [transaction])
Example rules I have setup
This is the transaction I get
where as if I import via a file
Account,Date,Payee,Notes,Category,Amount,Cleared
General,2024-03-25,New World,Test Note,Food,54.5,Cleared
I get the split rule applied
Keen to understand whether im using the api wrong or whether it doesn't support applying the split transaction when uploading via the api. Any help would be appreciated, thanks
It would be nice if the functionality for creating rules from existing transactions would pull in the splits.
I have an off-budget account for a loan I have, and when the charge comes in I turn it into a split transaction with the principal part being a transfer to the off-budget account and the interest part going to the original payee.
Since the principal vs interest amount is different each month I tried setting the split rule to set both splits to an amount of 0, hoping that it would leave the transaction in the same state as would happen if you did this manually, but having just synced one of these charges I see that an extra split is added with the difference.
I guess that's a reasonable default way to handle it, but my preferred way to handle these loan payments in particular would be to not have an extra split created with the extra and for something like the "X uncategorized transactions" notice to be shown for splits where the full balance hasn't been assigned.
I noticed a bug: If I enter a fixed value for a split in German format 123,45 then the amount will not be saved. I have to enter 123.45
Example: I created the following rule:
I typed in the total amount with a comma as separator. The first split also with a comma and the second split with a dot.
Only the second split gets saved:
A split I have didn't work this month. One I had on a different budget did work, that one was with a auto posting schedule.
A split I have didn't work this month. One I had on a different budget did work, that one was with a auto posting schedule.
Sorry, just to confirm, the auto posting one did work and the regular rule-based on didn't? Were you able to get the rule to apply manually?
👋 Im having trouble getting the split rule to apply when importing a transaction via the api.
I have tried importing via a file and works, however I can't seem to get it working with the api. Hoping you can help confirm if it's a me thing or if there is some functionality missing.
Example code using the api
... const accountId = '04bbaabb-5a1e-418b-abe4-678493f67043' const transaction = { "account": "33644b5c-fcfd-4580-9056-a28278835fb8", "date": "2024-03-25", "payee_name": "New World", "amount": 54500, "notes": "test" } await api.importTransactions(accountId, [transaction])
Example rules I have setup
This is the transaction I get
![]()
where as if I import via a file
Account,Date,Payee,Notes,Category,Amount,Cleared General,2024-03-25,New World,Test Note,Food,54.5,Cleared
I get the split rule applied
Keen to understand whether im using the api wrong or whether it doesn't support applying the split transaction when uploading via the api. Any help would be appreciated, thanks
Hey, I don't believe I implemented the API path yet. Happy to look into this
Id be happy to have a crack at implementing the api path if you can point me in the right direction
A split I have didn't work this month. One I had on a different budget did work, that one was with a auto posting schedule.
Sorry, just to confirm, the auto posting one did work and the regular rule-based on didn't? Were you able to get the rule to apply manually?
The auto posting one did work. I cant get this one on my main budget to have the rule apply. Even manually applying the rule wasn't working even though the transaction showed up in the match list
A split I have didn't work this month. One I had on a different budget did work, that one was with a auto posting schedule.
Sorry, just to confirm, the auto posting one did work and the regular rule-based on didn't? Were you able to get the rule to apply manually?
The auto posting one did work. I cant get this one on my main budget to have the rule apply. Even manually applying the rule wasn't working even though the transaction showed up in the match list
That sounds odd... What were the criteria/actions, if you don't mind me asking?
That rule is based on payee and approx amount. Im pretty sure that rule has triggered in the past fine. Ill keep watching to see if it keeps happening
@Marethyu1 check out https://github.com/actualbudget/actual/pull/2569/files#diff-21c5b30e746cbe9a3777fbd9c245d00284320a22e7a18e6c443c2466d1b97767R1099 for details on how to construct splits. Not sure if you need to expose this directly via the API or provide some logical wrapper! Notes:
- each non-zero split should have a
set-split-amount
action to compute the value of the split - a split with index 0 should be optional
hey @ByteChild, sorry you ran into this! Can you try with the preview link on this PR and see if it fixes your issue? https://github.com/actualbudget/actual/pull/2566
Hi folks, just added a VRT test in #2604 Whilst writing the test I noticed a couple of things
1. Setting a category in the before split doesn't make sense.
Behaviour: If add a split transaction and set the before split category to anything (eg 'food') when I enter the transaction it the category gets set to split instead of the category I set.
Example rule:
Rule that sets before split category to Food
Example Transaction:
Here the category is set to Split for the parent transaction
Potential fix: Because the parent transaction category for a split transaction will always be split, maybe we should stop users from setting a before split category in the ui? Keen to know what y'all think / if this makes sense?
2. When manually entering a split transaction you have to set payment amount first
In order for a split transaction rule to apply when being entered manually you have to set the payment amount first. This is pretty confusing and was discussed here. Definitely agree that this would be great an enhancement If anyone has time to look into it
Hi folks, just added a VRT test in #2604 Whilst writing the test I noticed a couple of things
1. Setting a category in the before split doesn't make sense.
Behaviour: If add a split transaction and set the before split category to anything (eg 'food') when I enter the transaction it the category gets set to split instead of the category I set.
Example rule: Rule that sets before split category to Food
Example Transaction: Here the category is set to Split for the parent transaction
Potential fix: Because the parent transaction category for a split transaction will always be split, maybe we should stop users from setting a before split category in the ui? Keen to know what y'all think / if this makes sense?
2. When manually entering a split transaction you have to set payment amount first
In order for a split transaction rule to apply when being entered manually you have to set the payment amount first. This is pretty confusing and was discussed here. Definitely agree that this would be great an enhancement If anyone has time to look into it
Hey! Thanks for the feedback.
For 1, the idea was that the actions there apply to all splits. I think a rename from "Before split" to "Apply to all" makes sense; what do you think? (Side note: seems like that logic isn't working! I'll look into it and fix.)
For 2, good idea, although not sure how difficult this would be to implement. I'll take a crack at it when I have time.
For 1, the idea was that the actions there apply to all splits. I think a rename from "Before split" to "Apply to all" makes sense; what do you think? (Side note: seems like that logic isn't working! I'll look into it and fix.)
Oh this makes a lot of sense - was confused as the logic wasn't working. I guess something that is kind of interesting is that it means you can apply a blanket category to all splits, and then within a split override a specific one. That actually seems reasonable enough to me. In terms of renaming it to 'apply to all', I agree that would be more clear to me.
Ive attached a screenshot below showing example case where you could override an individual category.
Assuming we can get it working what you are proposing makes sense to me 👍
For 1, the idea was that the actions there apply to all splits. I think a rename from "Before split" to "Apply to all" makes sense; what do you think? (Side note: seems like that logic isn't working! I'll look into it and fix.)
Oh this makes a lot of sense - was confused as the logic wasn't working. I guess something that is kind of interesting is that it means you can apply a blanket category to all splits, and then within a split override a specific one. That actually seems reasonable enough to me. In terms of renaming it to 'apply to all', I agree that would be more clear to me.
Ive attached a screenshot below showing example case where you could override an individual category.
Assuming we can get it working what you are proposing makes sense to me 👍
Opened a PR here with the changes we discussed to the "Before split" section, feel free to try it out here and let me know what you think!
Looks like we've not had any new feedback for a while. Any objections if we release this as a first party feature (i.e. remove the feature flag gating)?
Looks like we've not had any new feedback for a while. Any objections if we release this as a first party feature (i.e. remove the feature flag gating)?
I'm good to do that! I have two related outstanding PRs I'd like to fixup and get merged, and then I'll open one to remove the feature flag logic.
@jfdoming Another good to have would be to have the preview transactions show the splits. Right now it only shows the parent transaction as upcoming.
I have noticed that in the rule edit modal that only non-split or child transactions show up in the list of possible candidates for the rule. Maybe for rules that split, it should show the parent only and not look at children transactions.
This seems to make it hard to know if a split rule is matching correctly.