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

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

index d311cd3..c4e6053 100644 (file)
@@ -637,6 +637,46 @@ void CalendarTaskObject::SaveObjectData(string *SaveData){
                
        }
        
+       // Process the DUE value.
+       
+       if (DueData.size() > 0){
+               
+               DataLine += "DUE";
+               
+               if (DueDataTimeZoneID.size() > 0){
+               
+                       DataLine += ";TZID=";
+                       DataLine += DueDataTimeZoneID;
+                       
+               }
+               
+               if (DueDataValue.size() > 0){
+               
+                       DataLine += ";VALUE=";
+                       DataLine += DueDataValue;
+                       
+               }
+               
+               if (SummaryDataTokens.size() > 0){
+               
+                       DataLine += ";";
+                       DataLine += DueDataTokens;
+                       
+               }
+               
+               DataLine += ":";
+               DataLine += DueData;
+               DataLine += "\n";
+               
+               DataLineProcessed = OutputText(&DataLine);
+               
+               *SaveData += DataLineProcessed;
+
+               DataLine.clear();
+               DataLineProcessed.clear();
+               
+       }
+       
        *SaveData += "END:VTODO\n";
        
 }
\ No newline at end of file
index 0b6eba2..b661b75 100644 (file)
@@ -81,6 +81,7 @@ TEST(iCalendarSaveTask, SaveTaskTests){
        " y of the todo.\n"
        "URL;EXTERNAL=YES:http://www.example.com/\n"
        "RRULE;TEST=DATA:FREQ=DAILY;COUNT=10\n"
+       "DUE;TZID=Europe/Truro;VALUE=DATE-TIME;TEST=YES:20160131T150000Z\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