Bug 339449 - caldav protocol: Items older than a 3 months (hard coded) are not fetched
Summary: caldav protocol: Items older than a 3 months (hard coded) are not fetched
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: DAV Resource (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 339579 340599 350381 352091 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-09-27 10:38 UTC by Stefan Huber
Modified: 2015-09-01 13:16 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Huber 2014-09-27 10:38:35 UTC
Calender events of dates older a a few (3?) months are not fetched from the CalDAV server. However, a caldavzap (a javascript calender viewer) on the server shows them, so they exist. It seams as if there is no way to fetch all events and I got no response at the IRC channels #kde and #akonadi.

Reproducible: Always



Expected Results:  
I would suggest that either akonadi should fetch all resources or it gives the user the option to fetch all events, in case this is intended to be a performance feature.

I am running kde-4.14.1 and akonadi-server-1.13.0 on Gentoo. The CalDAV server is davical-1.1.1-1 on Debian wheezy.
Comment 1 Stefan Huber 2014-09-27 11:36:48 UTC
After digging into the code I found the hard coded value of 3 months here:

kdepim-runtime-4.14.1/resources/dav/protocols/caldavprotocol.cpp:31:
CaldavProtocol::CaldavProtocol()
{
  // Only fetch items for the last 3 months
  QString startTime = QDateTime::currentDateTimeUtc().addMonths( -3 ).toString( "yyyyMMddTHHMMss" );


As a very dirty hack, one can set the local time back, e.g., several years, force akonadi to resync (e.g., by restarting akonadi), and restore the time after the sync. However, be prepared to receive alarm messages with all alarms listed and ringing since then. I think there should be a better way to tell akonadi to fetch all items from a caldav resource.
Comment 2 mau 2014-09-29 15:16:30 UTC
I agree and propose there should be a "fast sync" of a folder/resource (F5) and a "complete sync" in the context menu.
Comment 3 Grégory Oestreicher 2014-09-29 18:31:15 UTC
(In reply to Stefan Huber from comment #0)
> I would suggest that either akonadi should fetch all resources or it gives
> the user the option to fetch all events, in case this is intended to be a
> performance feature.

This was added to prevent the resource from bringing down servers when big calendars were requested. I made the choice to use 3 months as it seemed a good compromise, knowing that it wouldn't suit everybody.

Now a configurable dialog to fetch older events was not added because we can't introduce new translatable strings in the UI in a maintenance release. I'm working to add this in the configuration dialog in the master branch.

Cheers,
Grégory
Comment 4 Grégory Oestreicher 2014-10-01 19:28:20 UTC
*** Bug 339579 has been marked as a duplicate of this bug. ***
Comment 5 Daniel Boff 2014-10-07 19:34:33 UTC
thanks for the update and your work! I am looking forward to the next release
Comment 6 Christian Fowelin 2015-03-23 06:34:30 UTC
I do have the same problem with my calendar. After reverting akonadi_davgroupware_ressource to the 4.14.0 version my calendar is working as expected again. This change needs be reverted, user need to see older entries as they do on their mobile devices, for example.
Comment 7 Daniel Boff 2015-03-24 21:25:55 UTC
is there any news on this? Any ETA when the configuration dialog is released?
Comment 8 Grégory Oestreicher 2015-08-12 18:58:31 UTC
*** Bug 350381 has been marked as a duplicate of this bug. ***
Comment 9 Grégory Oestreicher 2015-08-12 18:59:46 UTC
*** Bug 340599 has been marked as a duplicate of this bug. ***
Comment 10 Grégory Oestreicher 2015-08-17 21:11:35 UTC
Git commit fcdbb576d8313519e3638a343ecfaa37bf913d29 by Grégory Oestreicher.
Committed on 17/08/2015 at 21:11.
Pushed by goestreicher into branch 'master'.

Make the sync range configurable

This adds a UI to select whether or not the user
wants to limit the sync range to lower the load
on the server, and its value.

M  +13   -0    resources/dav/resource/configdialog.cpp
M  +1    -0    resources/dav/resource/configdialog.h
M  +72   -3    resources/dav/resource/configdialog.ui
M  +7    -3    resources/dav/resource/davgroupwareresource.cpp
M  +12   -0    resources/dav/resource/davgroupwareresource.kcfg
M  +16   -0    resources/dav/resource/settings.cpp
M  +1    -0    resources/dav/resource/settings.h

http://commits.kde.org/kdepim-runtime/fcdbb576d8313519e3638a343ecfaa37bf913d29
Comment 11 Daniel Boff 2015-08-27 16:41:10 UTC
Thanks a lot!
Comment 12 Grégory Oestreicher 2015-09-01 13:16:29 UTC
*** Bug 352091 has been marked as a duplicate of this bug. ***