Page MenuHomekolab.org

When editing a recurring incidence also ask what exactly the user wants to do.
ClosedPublic

Authored by knauss on Apr 27 2016, 3:08 PM.

Details

Summary

A recurrenting event can be edited differntly (only this occurence, all occurences, thisandfuture).
We need to ask the user, what he wants to edit exactly.

Diff Detail

Repository
rKP kdepim
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

knauss updated this revision to Diff 294.Apr 27 2016, 3:08 PM
knauss retitled this revision from to When editing a recurring incidence also ask what exactly the user wants to do..
knauss updated this object.
knauss edited the test plan for this revision. (Show Details)
knauss added a reviewer: mollekopf.
mollekopf requested changes to this revision.Apr 28 2016, 1:02 PM
mollekopf edited edge metadata.
mollekopf added inline comments.
korganizer/koeventpopupmenu.cpp
149

This seems to break isLastOccurrence just below? We're trying to figure out if qd is the last occurrence by getting the next one, with your change you just get the same occurrence again?
So while the code looks correct to get an occurrence on the date specified by qd, I think you need to do:

const KDateTime thisDateTime = inc->recurrence->getNextDateTime(qd.addDays(-1), QTime(23,59,59), CalendarSupport::KCalPrefs::instance()->timeSpec() ));

On the first line so you end up calling getNextDateTime twice for isLastOccurrence and isFirstOccurrence.

This revision now requires changes to proceed.Apr 28 2016, 1:02 PM
knauss updated this revision to Diff 301.Apr 28 2016, 8:41 PM
knauss edited edge metadata.

Fix the issue raised by christian.

knauss added inline comments.Apr 28 2016, 8:44 PM
korganizer/koeventpopupmenu.cpp
149

Well in this case it does not matter much because we only test !( isFirstOccurrence && isLastOccurrence ), that is only true for an item that is not a recurrenting one. But yes better fix the code, because it will be copied around :D

knauss updated this revision to Diff 302.Apr 28 2016, 8:48 PM
knauss edited edge metadata.

no need to modify showIncidencePopup, because it was correct before.

mollekopf accepted this revision.Apr 28 2016, 11:57 PM
mollekopf edited edge metadata.
This revision is now accepted and ready to land.Apr 28 2016, 11:57 PM
This revision was automatically updated to reflect the committed changes.