Fix VTODO and issues during rebase
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -123,9 +123,12 @@ class Card extends RelationalEntity {
|
|||||||
$calendar = new VCalendar();
|
$calendar = new VCalendar();
|
||||||
$event = $calendar->createComponent('VTODO');
|
$event = $calendar->createComponent('VTODO');
|
||||||
$event->UID = 'deck-card-' . $this->getId();
|
$event->UID = 'deck-card-' . $this->getId();
|
||||||
$event->DTSTAMP = new \DateTime($this->getDuedate());
|
if ($this->getDuedate()) {
|
||||||
|
$event->DTSTAMP = new \DateTime();
|
||||||
$event->DTSTART = new \DateTime($this->getDuedate());
|
$event->DTSTART = new \DateTime($this->getDuedate());
|
||||||
$event->DTEND = new \DateTime($this->getDuedate());
|
$event->DTEND = new \DateTime($this->getDuedate());
|
||||||
|
$event->DURATION = "PT1H";
|
||||||
|
}
|
||||||
$event->add('RELATED-TO', 'deck-stack-' . $this->getStackId());
|
$event->add('RELATED-TO', 'deck-stack-' . $this->getStackId());
|
||||||
|
|
||||||
// FIXME: For write support: CANCELLED / IN-PROCESS handling
|
// FIXME: For write support: CANCELLED / IN-PROCESS handling
|
||||||
@@ -134,6 +137,7 @@ class Card extends RelationalEntity {
|
|||||||
$date = new DateTime();
|
$date = new DateTime();
|
||||||
$date->setTimestamp($this->getLastModified());
|
$date->setTimestamp($this->getLastModified());
|
||||||
$event->COMPLETED = $date;
|
$event->COMPLETED = $date;
|
||||||
|
//$event->add('PERCENT-COMPLETE', 100);
|
||||||
}
|
}
|
||||||
if (count($this->getLabels()) > 0) {
|
if (count($this->getLabels()) > 0) {
|
||||||
$event->CATEGORIES = array_map(function ($label) {
|
$event->CATEGORIES = array_map(function ($label) {
|
||||||
|
|||||||
Reference in New Issue
Block a user