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

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

index 222e9a4..80d02fc 100644 (file)
@@ -120,6 +120,34 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){
                DataLineProcessed.clear();
                
        }
+
+       // Process the CREATED value.
+       
+       if (DateTimeCreatedData.size() > 0){
+               
+               if (DateTimeCreatedTokens.size() > 0){
+               
+                       DataLine += "CREATED;";
+                       DataLine += DateTimeCreatedTokens;
+                       
+               } else {
+
+                       DataLine += "CREATED";
+                       
+               }
+
+               DataLine += ":";
+               DataLine += DateTimeCreatedData;
+               DataLine += "\n";
+               
+               DataLineProcessed = OutputText(&DataLine);
+               
+               *SaveData += DataLineProcessed;
+               
+               DataLine.clear();
+               DataLineProcessed.clear();
+               
+       }
        
        *SaveData += "END:VTODO\n";
        
index 5e10bec..af26f79 100644 (file)
@@ -60,6 +60,7 @@ TEST(iCalendarSaveTask, SaveTaskTests){
        "DTSTAMP;OTHER=PARAM:20160131T104500Z\n"
        "CLASS;CHOCOLATE=NONE:PUBLIC\n"
        "COMPLETED;LYING=NEVER:20160131T110100Z\n"
+       "CREATED;CARAMEL=PLEASE:20160131T080000Z\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