GNOME Bugzilla – Bug 106401
[RFE] SX weekend occurence shift to weekdays
Last modified: 2018-06-29 20:28:50 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)
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.
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).
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.
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!
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.
Created attachment 123569 [details] [review] Patch against 2.2.7 implementing this
*** Bug 563066 has been marked as a duplicate of this bug. ***
Thanks - I'll commit in a few days.
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.
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.