GnuCash
Contact   Instructions
Bug 796885 - SX Editor Calendar Sometimes Shows Wrong Year, Wrong Next Date
Summary: SX Editor Calendar Sometimes Shows Wrong Year, Wrong Next Date
Status: NEW
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Scheduled Transactions (show other bugs)
Version: 3.2
Hardware: PC Linux
: Normal trivial
Target Milestone: ---
Assignee: core
QA Contact: core
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-04 19:30 EDT by NoobAlice
Modified: 2018-10-04 19:59 EDT (History)
3 users (show)

See Also:


Attachments
Picture 1 - Calendar correct (185.50 KB, image/png)
2018-10-04 19:30 EDT, NoobAlice
no flags Details
Picture 2 - Calendar wrong in SX editor (199.86 KB, image/png)
2018-10-04 19:30 EDT, NoobAlice
no flags Details

Description NoobAlice 2018-10-04 19:30:03 EDT
Created attachment 372999 [details]
Picture 1 - Calendar correct

OS: Arch Linux
Gnucash: 3.2

For scheduled transactions (SX) occurring once every 12 months (annually), the calendar on the scheduled transactions editor appears to show the wrong year when date of next occurrence is not a full year after last occurrence.

This behavior does NOT cause trouble in the SX listing.  That gives the correct next date and shows the correct calendar.

This behavior does NOT cause trouble with the actual SX creation.  The SX is created on the correct date.


Sample info:

Date format is YYYY-MM-DD or MM-DD

2017-04-01 was a Saturday
2017-04-02 was a Sunday

2018-04-01 was a Sunday
2018-04-02 was a Monday

2019-04-01 will be Monday
2019-04-02 will be Tuesday

Year of calendar is guessed based on day of the week of 04-01.

Steps to reproduce, with sample dates for clarity:

1) Schedule a transaction:
Frequency:        Monthly
Start Date:       2017-04-02
Every:            12 months
On the:           2nd
Except weekends:  Use next weekday

2) Make SX occur as scheduled for 2017-04-03 (because of weekend).  Make SX occur as scheduled for 2018-04-02.

3) Go to SX list.  Observe Next Occur is correctly 2018-04-02 (first picture).

4) Enter editor for SX.  Observe Next Occur is correctly 04-02 on calendar that appears to be 2019-04 (first picture).

5) In editor for SX, change
On the:           2nd
to
On the:           1st
Calendar changes to show year that appears to be 2017 (based on day of the week of 04-01 being Saturday) with transaction highlight on 04-01 (second picture).  Saving the transaction and reopening leaves information correct on SX list and shows wrong calendar for SX editor (second picture).


For discussion, see usernames "NoobAlice" and "fell" in IRC logs: 
https://code.gnucash.org/logs/2018/10/04.html

Note:
It might be nice to have months on the SX list and SX editor calendars labeled with month name and year.  So, 'April 2018' instead of just 'April.'  I don't know if that would be easy to change or useful besides for this one bug report.
Comment 1 NoobAlice 2018-10-04 19:30:54 EDT
Created attachment 373000 [details]
Picture 2 - Calendar wrong in SX editor
Comment 2 John Ralls 2018-10-04 19:59:00 EDT
A little experimenting shows that when one first creates an SX the calendar shown is for the current year, beginning in the current month. The calendar will change to match the year when the year is decremented but not when it's incremented.

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