Bug 317682 - Non-processing days no longer work for certain regions
Summary: Non-processing days no longer work for certain regions
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: git (master)
Platform: Compiled Sources Linux
: NOR major
Target Milestone: ---
Assignee: Ian Neal
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-01 13:41 UTC by Ian Neal
Modified: 2013-06-03 23:39 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Fix holiday region for KDE 4.5.0+ (1.58 KB, patch)
2013-04-01 13:49 UTC, Ian Neal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Neal 2013-04-01 13:41:07 UTC
Around the time of KDE4.5, kholiday's holiday.cpp was rewitten and split into holiday.cpp and holidayregion.cpp, compare:
http://api.kde.org/4.5-api/kdepimlibs-apidocs/kholidays/html/holidayregion_8cpp_source.html
with:
http://api.kde.org/4.4-api/kdepimlibs-apidocs/kholidays/html/holidays_8cpp_source.html

The long and the short of it, is that for the settings we should be using region codes rather than locations.

Reproducible: Always

Steps to Reproduce:
1. Use KMyMoney on a locale like United Kingdom
2. Schedule a transaction to fall on a public holiday (e.g. 1st April 2013 or 6th May 2013) with non-processing option set to next day.
3. Look at upcoming payments page.
Actual Results:  
Schedule shows payment as falling on public holiday.

Expected Results:  
Schedule shows payment as falling on day following public holiday.
Comment 1 Ian Neal 2013-04-01 13:49:21 UTC
Created attachment 78543 [details]
Fix holiday region for KDE 4.5.0+

This patch:
* Makes use of new HolidayRegion API to generate list of regions with languages for holiday region selector in schedule settings pane.

What this patch doesn't do:
* Check that current setting is a valid region.
Comment 2 David Houlden 2013-04-01 15:43:38 UTC
Just to mention that I'm on KDE 4.6.5 with KMyMoney holiday calendar set to United Kingdom and my schedules for 1st April have moved to 2nd April as I expect. I'm not sure why but I don't see the problem described by Ian.
Comment 3 Ian Neal 2013-04-01 15:50:43 UTC
(In reply to comment #2)
> Just to mention that I'm on KDE 4.6.5 with KMyMoney holiday calendar set to
> United Kingdom and my schedules for 1st April have moved to 2nd April as I
> expect. I'm not sure why but I don't see the problem described by Ian.

I'm on KDE 4.10.1, presumably at some point between 4.5 and 4.10 backwards compatibility was removed.
Comment 4 Ian Neal 2013-04-01 16:20:16 UTC
(In reply to comment #1)
> Created attachment 78543 [details]
> Fix holiday region for KDE 4.5.0+
> 
> This patch:
> * Makes use of new HolidayRegion API to generate list of regions with
> languages for holiday region selector in schedule settings pane.
> 
> What this patch doesn't do:
> * Check that current setting is a valid region.

Another option would be to use the new HolidayRegionSelector widget.
Comment 5 allan 2013-05-28 15:47:22 UTC
(In reply to comment #2)
> Just to mention that I'm on KDE 4.6.5 with KMyMoney holiday calendar set to
> United Kingdom and my schedules for 1st April have moved to 2nd April as I
> expect. I'm not sure why but I don't see the problem described by Ian.

I'm on KDE 4.9.5 and, like Dave, get the correct results, without the patch.  I've not taken particular note in the past of this feature's working.
Comment 6 Ian Neal 2013-05-28 15:52:54 UTC
(In reply to comment #5)
> (In reply to comment #2)
> > Just to mention that I'm on KDE 4.6.5 with KMyMoney holiday calendar set to
> > United Kingdom and my schedules for 1st April have moved to 2nd April as I
> > expect. I'm not sure why but I don't see the problem described by Ian.
> 
> I'm on KDE 4.9.5 and, like Dave, get the correct results, without the patch.
> I've not taken particular note in the past of this feature's working.

Well for KDE 4.10.1 upwards running on Fedora 17/18 x64, it definitely is required.
Comment 7 allan 2013-05-28 15:57:07 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #2)
> > > Just to mention that I'm on KDE 4.6.5 with KMyMoney holiday calendar set to
> > > United Kingdom and my schedules for 1st April have moved to 2nd April as I
> > > expect. I'm not sure why but I don't see the problem described by Ian.
> > 
> > I'm on KDE 4.9.5 and, like Dave, get the correct results, without the patch.
> > I've not taken particular note in the past of this feature's working.
> 
> Well for KDE 4.10.1 upwards running on Fedora 17/18 x64, it definitely is
> required.

Not doubting you, Ian, just responding to your comment on Reviewboard about checking on other revs.
Comment 8 David Houlden 2013-06-02 18:16:51 UTC
Compiled ok and tested ok on both KDE 4.6.5 and 4.8.5 which are the two versions I have access to. I don't have an id for reviewboard so haven't comments updated there.
Comment 9 Ian Neal 2013-06-03 23:39:45 UTC
commit 795dfb4a9e158ea1ed2fef59d48c25f341c65a90