Bug 345565 - completed recurring to-do recurs on wrong date
Summary: completed recurring to-do recurs on wrong date
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kcalendarcore
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.71.0
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-27 03:10 UTC by gjditchfield
Modified: 2020-06-14 12:06 UTC (History)
1 user (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 gjditchfield 2015-03-27 03:10:16 UTC
When I mark a monthly recurring to-do as "done", the next occurrence is given incorrect start and due dates.

Reproducible: Always

Steps to Reproduce:
1. I created a monthly recurring to-do. The edit dialog for the to-do said its start date was 2015-03-25 and its due date was 2015-03-26, and the recurrence tab of the dialog said the to-do repeats monthly, every 1 month, on the 25th. The to-do summary list said its start date was 2015-03-26 and its due date was 2015-03-27. (See bug 345498 for more details).
2. I waited until 2015-03-26.
3. In the To-do list summary view, I clicked the check box on the to-do's line.

Actual Results:  
The to-do list summary says that the to-do's start date is 2015-04-27 and its due date is 2015-04-28.

Expected Results:  
The to-do list summary should say that the to-do's start date is 2015-04-25 and its due date is 2015-04-26.

Korganizer 4.14.6, 
OS Linux (x86_64) release 3.19.0-10-generic (Kubuntu Vivid beta, fully updated),
compiler x86_64-linux-gnu-gcc
Comment 1 Denis Kurz 2017-06-23 20:01:21 UTC
This bug has never been confirmed for a KDE PIM version that is based on KDE Frameworks (5.x). Those versions differ significantly from the old 4.x series. Therefore, I plan to close it in around two or three months. In the meantime, it is set to WAITINGFORINFO to give reporters the oportunity to check if it is still valid. As soon as someone confirms it for a recent version (at least 5.1, ideally even more recent), I'll gladly reopen it.

Please understand that we lack the manpower to triage bugs reported for versions almost two years beyond their end of life.
Comment 2 gjditchfield 2017-07-02 21:25:58 UTC
The bug still exists in Korganizer 5.4.3, embedded in Kontact.

On 2017-07-02, in Kontact's "To-do List" tab, I selected an old recurring to-do.  Kontact's to-do summary showed a start date of 2016-04-18 and a due date of 2016-04-25.

I opened the todo, and the dialog showed start date 2014-07-17, due date 2014-07-24, repeats monthly, every 1 month, on the 17th.

I closed the dialog, and clicked the check box in Kontact's summary list.

Actual results: the summary start date changed to 2017-07-24, due date 2017-07-31.

Expected results: start date should be 2017-07-17 and due date should be 2017-07-24
Comment 3 Christoph Feck 2017-07-15 01:00:57 UTC
Thanks for the update; setting status.
Comment 4 Karsten de Freese 2019-12-07 18:59:52 UTC
still an issue with Korganizer 5.12.3 (I'm using Tumbleweed)
Comment 5 Karsten de Freese 2019-12-08 00:25:10 UTC
It appears that the problems can be worked around under specific conditions:
- have start & due dates on the same day (e.g. via different times)
- save the to-do before entering the recurrence
Comment 6 gjditchfield 2020-06-10 21:44:39 UTC
Git commit dc7b1865c3bff04d0173505335da22cefa3b5f5f by Glen Ditchfield.
Committed on 10/06/2020 at 15:17.
Pushed by winterz into branch 'master'.

Fix serialization of recurring to-do's start date

KCalendarCore uses Todo::Private::mDtRecurrence to hold the start date
and time of the next uncompleted occurrance of a recurring Todo, and
deserializes it from the X-KDE-LIBKCAL-DTRECURRENCE property of iCalendar
files.  However, ICalFormatImpl::writeTodo() serializes dtDue() into that
property, not dtStart().

When KOrganizer creates a new recurring to-do, it serializes the to-do,
then deserializes it to populate the To-Do List view, so the view shows
an incorrect start date (and an incorrect due date, which is calculated
from the start date).
Related: bug 345498

M  +1    -0    autotests/CMakeLists.txt
A  +83   -0    autotests/testdateserialization.cpp     [License: LGPL(v3.0+)]
A  +19   -0    autotests/testdateserialization.h     [License: LGPL(v3.0+)]
M  +2    -3    src/icalformat_p.cpp

https://invent.kde.org/frameworks/kcalendarcore/commit/dc7b1865c3bff04d0173505335da22cefa3b5f5f