Bug 50911

Summary: Sub-todos should inherit categories from parent
Product: [Applications] korganizer Reporter: ieure
Component: generalAssignee: Cornelius Schumacher <schumacher>
Status: RESOLVED FIXED    
Severity: wishlist    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:

Description ieure 2002-11-18 16:45:21 UTC
Version:            (using KDE KDE 3.0.4)
Installed from:    Debian stable Packages
OS:          Linux

It would be very nice if sub-todos could inherit the categories selected for their parent on creation.

It would be even nicer if all sub-todos always had at least the same categories as their parents. For example, if I create a 'Foo Project' To-do, and categorize it as  "Business, Client Projects," then create a sub-todo 'Implement bar widget,' the sub-todo should have "Business, Client Projects" as it's categories. If I then add another categorization, "Features," to the sub, and remove "Business" from the parent, the sub should have "Client Projects, Features" as it's categories.

IOW, every sub-todo always has it's parent's categories, but can be further categorized if desired.
Comment 1 Johannes Jordens 2003-10-19 00:27:18 UTC
I second that, furthermore, due date/time, attendees & access should also be inherited (if only for a starting point, it'd be very helpful
Comment 2 Bram Schoenmakers 2004-04-18 17:55:31 UTC
CVS commit by bram: 

Newly created subtodos will inherit properties like category and
date from it's parent. (wish #50911).

CCMAIL: 50911-done@bugs.kde.org


  M +11 -2     kotodoeditor.cpp   1.54


--- kdepim/korganizer/kotodoeditor.cpp  #1.53:1.54
@@ -253,5 +253,14 @@ void KOTodoEditor::setDefaults( QDateTim
   mRelatedTodo = relatedEvent;
 
+  // inherit some properties from parent todo
+  if ( mRelatedTodo ) {
+    mGeneral->setCategories( mRelatedTodo->categoriesStr() );
+    mCategoryDialog->setSelected( mRelatedTodo->categories() );
+    if ( mRelatedTodo->hasDueDate() )
+      mGeneral->setDefaults( mRelatedTodo->dtDue(), allDay ); 
+  }
+  else
   mGeneral->setDefaults( due, allDay );
+  
   mDetails->setDefaults();
   mAttachments->setDefaults();