Skip to content
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

Schedule Posting - Rules not being applied #1775

Closed
1 task done
Kidglove57 opened this issue Oct 9, 2023 · 10 comments
Closed
1 task done

Schedule Posting - Rules not being applied #1775

Kidglove57 opened this issue Oct 9, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@Kidglove57
Copy link

Verified issue does not already exist?

  • I have searched and found no existing issue

What happened?

I have rules enabled to add a category and note to a scheduled transaction on posting. These rules were not applied on two transactions posted today. I have tested this further as follows:
I) I removed the option to move the transaction to after the weekend. When I did this the category and note were correctly applied.
2) Therefore it seems that the new option to post before or after a weekend is causing the problem
3) I am able to reproduce this error by advance posting a number of future scheduled transactions
4) HOWEVER I cannot reproduce this error on all schedules!
5) I have tested in Safari and Brave.

What error did you receive?

No response

Where are you hosting Actual?

Fly.io

What browsers are you seeing the problem on?

Safari

Operating System

Mac OSX

@Kidglove57 Kidglove57 added the bug Something isn't working label Oct 9, 2023
@shall0pass
Copy link
Contributor

I'll add to this report, though I'm not certain if it's related.

I have a schedule that gets automatically added on 3 specific days of the month. Today, the 11th, I checked my ledger and I saw that the schedule was posted but also showed it as upcoming and 'due'. I opened the budget on a different device and saw I had two posted transactions and one upcoming showing 'due', giving the impression that the link between the schedule and posted transaction was somehow lost. I tried navigating to the schedules page, and chose 'post transaction' from the affected schedule, and while it did post the transaction it was not marked as 'paid'.

I unfortunately am not able to reproduce this on demo.actualbudget.org and am not certain if Rules was a factor.

Within the schedule editor, the dialog for 'Linked transactions' does not include todays transactions, but under 'Find matching transactions' they are listed along with the circular arrows next to the payee name.

@shall0pass
Copy link
Contributor

Quick follow up: I was able to relink the transaction to the schedule so it behaves appropriately again.

  1. Select the transaction in the ledger that is behaving incorrectly.
  2. Select from the menu -> Unlink schedule
  3. Select from the menu (while transaction is still selected) -> Link schedule
  4. Select the schedule from the pop up window

@Kidglove57
Copy link
Author

Kidglove57 commented Oct 11, 2023

@shall0pass Thank you for the investigation! You inspired me to search further for a solution to my issue. Delinking and relinking the schedule unfortunately did not work for me.

However, I remained puzzled as to why some of my transactions posted with the rules correctly applied and some did not.

Here is the solution I found. For context this is where I have adjusted a schedule to "post after a weekend"

  1. My schedules that were posting correctly all had one thing in common. In the rule, one of the conditions was set as "the date is approx ...."
  2. The schedules that failed to apply the rule had this condition set as "the date is ....". Therefore the rules failed when the date moved before or after a weekend because the date no longer matched the rule.

LESSON: Ensure all relevant schedules have the date condition set as "The date is approx..."

@shall0pass
Copy link
Contributor

That's interesting. Maybe there's some room for improvement there. Automatically converting a linked rule to "The date is approx..." when using "move schedule" option could keep this from happening.

@Kidglove57
Copy link
Author

@shall0pass Yes that would certainly help!

Interestingly the huge majority of my schedules had the "date is approx" already set. Even though I had not knowingly done so.

@shall0pass
Copy link
Contributor

This issue caught me again this month.

@youngcw
Copy link
Member

youngcw commented Dec 5, 2023

I think I had the same thing happen just now, but I manually posted the schedule and it still didn't clear out the upcoming schedule line. That schedule has the "date is approx" in the rule

@shall0pass
Copy link
Contributor

I'm a little slow. I wasn't finding the 'date is approx' item until today. Any idea what the time window is on that option? I wonder if the before/after weekend option is shoving me outside the window, although the schedule it happened to me on didn't use that feature.

I'm going to change my schedule that had issues to use 'date is' and see if that resolves it.

@Kidglove57
Copy link
Author

“Date is” was what caused me the original problem (see my earlier comment) and appeared to be because “Date is” left no flexibility for the logic to deal with before or after a weekend and the rule could not be applied. Since I changed everything to “Date is Approx” (two months ago) my rules have consistently been applied on posting.

My memory may be faulty but I believe the window is 2 days either side. Anything outside of that appeared to recreate the scheduled transaction.

@shall0pass
Copy link
Contributor

Just to bump this, I've now had multiple schedules the last couple days that did not post automatically and used to fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants