Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added COMPLETED property for saving data from a CalendarTaskObject.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Mon, 6 Jun 2016 20:42:44 +0000 (21:42 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Mon, 6 Jun 2016 20:42:44 +0000 (21:42 +0100)
Added the code and unit tests for the COMPLETED property.

source/objects/calendartask/CalendarTask-Save.cpp
source/tests/xestiacalendar_icaltasksave.h

index 5e64ecc..222e9a4 100644 (file)
@@ -93,6 +93,34 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){
                
        }
        
+       // Process the COMPLETED value.
+       
+       if (CompletedData.size() > 0){
+               
+               if (CompletedDataTokens.size() > 0){
+               
+                       DataLine += "COMPLETED;";
+                       DataLine += CompletedDataTokens;
+                       
+               } else {
+
+                       DataLine += "COMPLETED";
+                       
+               }
+
+               DataLine += ":";
+               DataLine += CompletedData;
+               DataLine += "\n";
+               
+               DataLineProcessed = OutputText(&DataLine);
+               
+               *SaveData += DataLineProcessed;
+               
+               DataLine.clear();
+               DataLineProcessed.clear();
+               
+       }
+       
        *SaveData += "END:VTODO\n";
        
 }
\ No newline at end of file
index 8ea88e4..5e10bec 100644 (file)
@@ -59,6 +59,7 @@ TEST(iCalendarSaveTask, SaveTaskTests){
        "UID;UNIQUEPARAM=CERTAINLY;OKAY=MAYBENOT:b3a16392-ad86-4061-be53-c215af2306e1\n"
        "DTSTAMP;OTHER=PARAM:20160131T104500Z\n"
        "CLASS;CHOCOLATE=NONE:PUBLIC\n"
+       "COMPLETED;LYING=NEVER:20160131T110100Z\n"
        "END:VTODO\n"
        "END:VCALENDAR";
        
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy