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 104844 - Scheduled Transactions on 31st/last put in following month
Scheduled Transactions on 31st/last put in following month
Status: VERIFIED FIXED
Product: GnuCash
Classification: Other
Component: Scheduled Transactions
git-master
Other Linux
: Normal normal
: ---
Assigned To: Josh Sled
Josh Sled
: 106254 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-01-30 19:11 UTC by Roland Roberts
Modified: 2018-06-29 20:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Roland Roberts 2003-01-30 19:11:38 UTC
I am trying to set up a payroll deposit as a scheduled transaction
which takes plast on the last day of the month.  I took the one for
tomorrow and, from my checking account ledger, clicked on the
"Schedule" icon to use it as a template.  I went into advanced to tell
GnuCash to enter the transaction automatically, 14 days in advance,
and to make the take the 31st/last.  It had automatically selected
placing the transaction on 28 Feb 2003 as the next entry, and I left
that.  After selecting "okay" to enter the transaction, the list of
scheduled transactions showed this as being scheduled for 3 March
2003.  Thinking I has misentered it due to mouse sloppiness, I
reopened the advanced dialogue and re-entered it as the 31st/last.
Once again, after clicking "okay", the transaction shows as being
scheduled on 3 March 2003.
Comment 1 Roland Roberts 2003-01-30 19:15:23 UTC
Here is the SX that ended up in my gnucash.data

<gnc:schedxaction version="1.0.0">
  <sx:id type="guid">c2a92113e76bf69786ba2ca26eb2adf1</sx:id>
  <sx:name>Roland's Paycheck (IDC)</sx:name>
  <sx:autoCreate>y</sx:autoCreate>
  <sx:autoCreateNotify>n</sx:autoCreateNotify>
  <sx:advanceCreateDays>14</sx:advanceCreateDays>
  <sx:advanceRemindDays>0</sx:advanceRemindDays>
  <sx:instanceCount>1</sx:instanceCount>
  <sx:start>
    <gdate>2003-02-28</gdate>
  </sx:start>
  <sx:templ-acct
type="guid">f4f881a162281bfc66790b4e3fab64f1</sx:templ-acct>
  <sx:freqspec>
    <gnc:freqspec version="1.0.0">
      <fs:id type="guid">9ff4239cbddefeb9ebc644ae155c570f</fs:id>
      <fs:ui_type>monthly</fs:ui_type>
      <fs:monthly>
        <fs:interval>1</fs:interval>
        <fs:offset>0</fs:offset>
        <fs:day>3</fs:day>
      </fs:monthly>
    </gnc:freqspec>
  </sx:freqspec>
</gnc:schedxaction>
Comment 2 Josh Sled 2004-03-07 21:26:37 UTC
*** Bug 106254 has been marked as a duplicate of this bug. ***
Comment 3 Josh Sled 2004-03-07 22:37:32 UTC
I cannot reproduce this, nor can I see in the code where it's
happening.  Can someone provide a different sequence of instructions
which does reproduce this?

In the course of doing that, does the calendar appear correct?
Comment 4 Ryan Colp 2005-01-15 05:55:53 UTC
I'm running GnuCash 1.8.10 on Gentoo Linux, and I'm experiencing this problem as
well.  

I see a pattern.  To reproduce:
Go to set up a new scheduled transaction.
Select "Monthly" as the Recurrence Frequency
Enter a start date in a month with less than 31 days (ie: February, April, June,
September or November).
Select "On the [31st/last]"
Look at the calendar display below it, and you will find the 1st, 2nd or 3rd of
the following month highlighted instead of the last day.

A similar thing happens with Semi-Monthly frequency, but with a twist:
Enter a start date in a month with exactly 31 days (ie: January, March, May,
July, August, October or December).
Select "On the [31st/last]" for either of the two day selections.
Look at the calendar display -- similar behaviour to Monthly as per above.

When this problem occurs, selecting the 29th/last, 30th/last and 31st/last
actually highlights the 1st, 2nd or 3rd of the following month respectively.
Comment 5 Chris Shoemaker 2006-03-27 16:58:43 UTC
Behavior in 1.9.3 is exactly as described above.
Comment 6 Josh Sled 2007-01-14 17:39:55 UTC
Yeah.  We hand "Feb 31 2003" to mktime(...), and it cheerfully does the math for us. :(   Luckily, we can use any month with 31 days to setup the FreqSpec; the SX'es start date is separate.

Fixed in branches/sx-cleanup/@15375.  This probably won't land until 2.2, though.
Comment 7 Josh Sled 2007-01-20 23:05:00 UTC
Merged to trunk@15399.  2.2
Comment 8 John Ralls 2018-06-29 20:26:45 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=104844. Please update any external references or bookmarks.