Bug 131597 - reoccuring todos not written to journal when completed
Summary: reoccuring todos not written to journal when completed
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-31 17:56 UTC by Tami King
Modified: 2006-12-24 00:31 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tami King 2006-07-31 17:56:07 UTC
Version:           3.5.3 (using KDE KDE 3.5.3)
Installed from:    Gentoo Packages
Compiler:          gcc version 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9) 
OS:                Linux

I have record completed to-do in journal entries turned on but when I complete a reoccuring todo it isn't recorded to the journal.  It works just fine for non-reoccuring todos.
Comment 1 Reinhold Kainhofer 2006-11-02 19:21:02 UTC
Reassigning all KOrganizer bug reports and wishes to the newly created 
korganizer-devel mailing list.
Comment 2 Bram Schoenmakers 2006-12-24 00:31:38 UTC
SVN commit 616160 by bram:

Record completion of recurring todos in journals.

BUG:131597



 M  +4 -2      calendarview.cpp  
 M  +1 -1      koglobals.h  
 M  +4 -2      kotodoview.cpp  


--- branches/KDE/3.5/kdepim/korganizer/calendarview.cpp #616159:616160
@@ -687,10 +687,12 @@
   // as well.
   if ( newIncidence->type() == "Todo"
     && KOPrefs::instance()->recordTodosInJournals()
-    && what == KOGlobals::COMPLETION_MODIFIED ) {
+    &&  ( what == KOGlobals::COMPLETION_MODIFIED
+    || what == KOGlobals::COMPLETION_MODIFIED_WITH_RECURRENCE ) ) {
 
       Todo *todo = static_cast<Todo *>(newIncidence);
-      if ( todo->isCompleted() ) {
+      if ( todo->isCompleted()
+      || what == KOGlobals::COMPLETION_MODIFIED_WITH_RECURRENCE ) {
         QString timeStr = KGlobal::locale()->formatTime( QTime::currentTime() );
         QString description = i18n( "To-do completed: %1 (%2)" ).arg(
           newIncidence->summary() ).arg( timeStr );
--- branches/KDE/3.5/kdepim/korganizer/koglobals.h #616159:616160
@@ -43,7 +43,7 @@
     enum { PRIORITY_MODIFIED, COMPLETION_MODIFIED, CATEGORY_MODIFIED,
            DATE_MODIFIED, RELATION_MODIFIED, ALARM_MODIFIED,
            DESCRIPTION_MODIFIED, SUMMARY_MODIFIED,
-           UNKNOWN_MODIFIED };
+           COMPLETION_MODIFIED_WITH_RECURRENCE, UNKNOWN_MODIFIED };
 
     static void fitDialogToScreen( QWidget *widget, bool force=false );
     KConfig *config() const;
--- branches/KDE/3.5/kdepim/korganizer/kotodoview.cpp #616159:616160
@@ -42,7 +42,6 @@
 #include <libkcal/resourcecalendar.h>
 #include <libkcal/calfilter.h>
 #include <libkcal/incidenceformatter.h>
-#include <libkcal/journal.h>
 
 #include <libkdepim/clicklineedit.h>
 #include <libkdepim/kdatepickerpopup.h>
@@ -892,7 +891,10 @@
       todo->setPercentComplete( percentage );
     }
     item->construct();
-    mChanger->changeIncidence( oldTodo, todo, KOGlobals::COMPLETION_MODIFIED );
+    if ( todo->doesRecur() && percentage == 100 )
+      mChanger->changeIncidence( oldTodo, todo, KOGlobals::COMPLETION_MODIFIED_WITH_RECURRENCE );
+    else
+      mChanger->changeIncidence( oldTodo, todo, KOGlobals::COMPLETION_MODIFIED );
     mChanger->endChange( todo );
     delete oldTodo;
   } else {