GnuCash
Contact   Instructions
Bug 685102 - Scheduled Transactions don't always respect weekends for first occurrence
Summary: Scheduled Transactions don't always respect weekends for first occurrence
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Scheduled Transactions (show other bugs)
Version: 2.4.x
Hardware: Other Linux
: Normal normal
Target Milestone: ---
Assignee: core
QA Contact: core
URL:
Whiteboard:
Keywords:
: 740146 797055 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-09-29 13:01 EDT by Tommy Trussell
Modified: 2020-03-22 18:50 EDT (History)
9 users (show)

See Also:


Attachments

Description Tommy Trussell 2012-09-29 13:01:51 EDT
I just installed 2.4.10 on this laptop running Ubuntu 12.04, and created a scheduled transaction to be created on the 29th of the month. (Today is Saturday September 29th.) I also specified that if the transaction falls on a weekend to create it on the previous weekday.

Next I chose Actions --> Scheduled Transactions --> Since last run... and had it create the new transaction. 

Lo and behold, it created the transaction for TODAY.

I expected the transaction to be created for yesterday.
Comment 1 Tommy Trussell 2012-09-29 14:46:43 EDT
After a discussion on the mailing list I updated the bug. 

I just tested it for NEXT weekend -- I created a transaction scheduled to be created on the 6th and on the previous weekday, and it created it for October 5th.

As it turns out when I created the transaction for NEXT weekend, it seems to follow the rule.

I would contend that the SX should ALWAYS follow the rules you set because you might be "catching up" after not running GnuCash for a few weeks and you would want the transactions created as they SHOULD have been.

I will create a transaction for this weekend and test it next week to see what it does.
Comment 2 Tommy Trussell 2012-09-29 14:56:17 EDT
I just tested again trying to create two transactions on the 29th (tomorrow) saying in one scheduled transaction to create it the weekday before, and in the other on the weekday after, and in both cases it created the transaction for tomorrow (Sunday) rather than on Monday as expected.
Comment 3 Tommy Trussell 2012-09-29 15:53:13 EDT
I just tested yet again trying to create two transactions for Sunday, October 7th, asking it to create a transaction on the previous weekday and the next weekday, and in both cases it created the transactions on Sunday October 7th instead of on Friday October 5th and Monday October 8th as expected.
Comment 4 Geert Janssens 2015-02-07 10:45:45 EST
Confirmed and still the case in GnuCash 2.6.5.
Comment 5 Geert Janssens 2015-02-11 05:23:57 EST
*** Bug 740146 has been marked as a duplicate of this bug. ***
Comment 6 John Ralls 2017-09-24 18:18:22 EDT
Reassign version to 2.4.x so that individual 2.4 versions can be retired.
Comment 7 Paul White 2018-02-01 09:42:32 EST
I came across this bug using GnuCash 2.6.19.

I have a transaction scheduled for the 4th of every month which is to take place on the next weekday if the 4th falls on a weekend. The transaction was created automatically on program start up for 4th February (Sunday) rather than 5th February (Monday) as expected.
Comment 8 Geert Janssens 2019-02-02 08:55:45 EST
*** Bug 797055 has been marked as a duplicate of this bug. ***
Comment 9 Dale Phurrough 2019-04-29 07:51:41 EDT
Reproduces in GnuCash 3.5 on Windows 10.

===Setup
Windows 10
GnuCash 3.5

===Repo
1. Set computer date to 29 April 2019
2. Run Quicken 3.5
3. Create scheduled transaction with the following:
   Enabled
   Remind in advance: 3 days
   Repeats: forever
   Frequency: Monthly
   Start Date: 2019-04-01
   Every: 1 month
   On the: 27th
   Except on weekends: Use previous weekday

===Result
The graphic calendars below will mark:
27 Apr 2019  <---- incorrect shift of date
27 May 2019
27 Jun 2019
26 Jul 2019  <---- correct shift of date
etc, ...

===Expected
Graphics calendars with:
26 Apr 2019
27 Mar 2019
etc, ...
Comment 10 Christopher Lam 2020-03-22 18:50:56 EDT
fixed in https://github.com/Gnucash/gnucash/pull/671 for 3.9

Note You need to log in before you can comment on or make changes to this bug.