After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 106401 - [RFE] SX weekend occurence shift to weekdays
[RFE] SX weekend occurence shift to weekdays
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Scheduled Transactions
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Josh Sled
Josh Sled
: 563066 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-02-18 10:20 UTC by Herbert Thoma
Modified: 2018-06-29 20:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch against 2.2.3 implementing this (43.41 KB, patch)
2008-03-04 16:04 UTC, Simon Arlott
none Details | Review
Patch against 2.2.7 implementing this (42.38 KB, patch)
2008-11-10 19:00 UTC, Simon Arlott
committed Details | Review
Patch against 2.2.7 implementing this (41.59 KB, patch)
2008-11-27 19:51 UTC, Simon Arlott
committed Details | Review

Description Herbert Thoma 2003-02-18 10:20:01 UTC
I would like to specify the date of a scheduled transaction like this:
At the 15th of each month but if that is a saturday or a sunday then
at the next monday after that (or the friday before)
Comment 1 Simon Arlott 2008-03-04 16:04:52 UTC
Created attachment 106556 [details] [review]
Patch against 2.2.3 implementing this

Aside from some combinations being possible that don't make sense (because I haven't looked at how to hide the extra combo boxes for them), and some awful code in recurrenceNextInstance to stop it trying to go backwards (it may make more sense to store the date that was going to be used next before it's changed back/forward, so that that can be compared instead), it seems to work ok.
Comment 2 Simon Arlott 2008-11-10 19:00:32 UTC
Created attachment 122345 [details] [review]
Patch against 2.2.7 implementing this

Updated patch against 2.2.7 (there were some changes in 2.2.4 stopping it applying).
Comment 3 Christian Stimming 2008-11-26 21:19:22 UTC
Applied to trunk, r17725, but with some necessary adjustments in engine/test/test-recurrence.c. As this was trunk and not 2.2-branch, it needed also a manual fixing the rejected patch in engine/gnc-budget.c, but this wasn't a problem. I am hesitating to propose this for the 2.2 branch because it should receive some further testing/review before being moved into a stable branch, IMHO. But as it's in trunk it will be in the next stable series.
Comment 4 Christian Stimming 2008-11-26 22:43:51 UTC
Nah, I got cold feet due to the warnings in the XML parser. The really relevant parts of the original patch are reverted by r17730. Please resubmit where the XML parser will load files from before this patch without any warnings. Thanks!
Comment 5 Simon Arlott 2008-11-27 19:51:08 UTC
I didn't notice it wouldn't load any old SX because I didn't have any... this change was necessary for me to use it at all.

I've changed the "required" flag in recurrence_dom_handlers in src/backend/file/gnc-recurrence-xml-v2.c and it correctly loads old files now. The GUI for this is a little odd in that the setting appears blank instead of being set to "No change" (it should default to WEEKEND_ADJ_NONE if not set as that's 0).

You should revert my change to src/gnome/dialog-sx-since-last-run.c (r17725) which introduces an ifdef around the [annoying] on-startup SX popup window.
Comment 6 Simon Arlott 2008-11-27 19:51:49 UTC
Created attachment 123569 [details] [review]
Patch against 2.2.7 implementing this
Comment 7 Christian Stimming 2008-12-03 12:38:33 UTC
*** Bug 563066 has been marked as a duplicate of this bug. ***
Comment 8 Christian Stimming 2008-12-03 12:39:19 UTC
Thanks - I'll commit in a few days.
Comment 9 Christian Stimming 2008-12-06 21:55:32 UTC
Trunk, r17751. Thanks a lot! I'm still hesitating to propose this for back-port to 2.2.8, but it will by definition be in 2.4.x for sure.
Comment 10 John Ralls 2018-06-29 20:28:50 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=106401. Please update any external references or bookmarks.