@@ -123,9 +123,12 @@ public function getCalendarObject(): VCalendar {
123123 $ calendar = new VCalendar ();
124124 $ event = $ calendar ->createComponent ('VTODO ' );
125125 $ event ->UID = 'deck-card- ' . $ this ->getId ();
126- $ event ->DTSTAMP = new \DateTime ($ this ->getDuedate ());
127- $ event ->DTSTART = new \DateTime ($ this ->getDuedate ());
128- $ event ->DTEND = new \DateTime ($ this ->getDuedate ());
126+ if ($ this ->getDuedate ()) {
127+ $ event ->DTSTAMP = new \DateTime ();
128+ $ event ->DTSTART = new \DateTime ($ this ->getDuedate ());
129+ $ event ->DTEND = new \DateTime ($ this ->getDuedate ());
130+ $ event ->DURATION = "PT1H " ;
131+ }
129132 $ event ->add ('RELATED-TO ' , 'deck-stack- ' . $ this ->getStackId ());
130133
131134 // FIXME: For write support: CANCELLED / IN-PROCESS handling
@@ -134,6 +137,7 @@ public function getCalendarObject(): VCalendar {
134137 $ date = new DateTime ();
135138 $ date ->setTimestamp ($ this ->getLastModified ());
136139 $ event ->COMPLETED = $ date ;
140+ //$event->add('PERCENT-COMPLETE', 100);
137141 }
138142 if (count ($ this ->getLabels ()) > 0 ) {
139143 $ event ->CATEGORIES = array_map (function ($ label ) {
@@ -142,7 +146,7 @@ public function getCalendarObject(): VCalendar {
142146 }
143147 foreach ($ this ->getAssignedUsers () as $ user ) {
144148 $ participant = $ user ->resolveParticipant ();
145- // FIXME use proper uri
149+ // FIXME use proper uri
146150 $ event ->add ('ATTENDEE ' , 'https://localhost/remote.php/dav/principals/users/: ' . $ participant ->getUID (), [ 'CN ' => $ participant ->getDisplayName ()]);
147151 }
148152
0 commit comments