Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14048311
D13140.id31735.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D13140.id31735.diff
View Options
diff --git a/src/applications/calendar/query/PhabricatorCalendarEventQuery.php b/src/applications/calendar/query/PhabricatorCalendarEventQuery.php
--- a/src/applications/calendar/query/PhabricatorCalendarEventQuery.php
+++ b/src/applications/calendar/query/PhabricatorCalendarEventQuery.php
@@ -10,6 +10,7 @@
private $inviteePHIDs;
private $creatorPHIDs;
private $isCancelled;
+ private $eventsWithNoParent;
private $instanceSequencePairs;
private $generateGhosts = false;
@@ -50,6 +51,11 @@
return $this;
}
+ public function withEventsWithNoParent($events_with_no_parent) {
+ $this->eventsWithNoParent = $events_with_no_parent;
+ return $this;
+ }
+
public function withInstanceSequencePairs(array $pairs) {
$this->instanceSequencePairs = $pairs;
return $this;
@@ -272,6 +278,12 @@
(int)$this->isCancelled);
}
+ if ($this->eventsWithNoParent == true) {
+ $where[] = qsprintf(
+ $conn_r,
+ 'event.instanceOfEventPHID IS NULL');
+ }
+
if ($this->instanceSequencePairs !== null) {
$sql = array();
@@ -339,9 +351,7 @@
$instance_of = $event->getInstanceOfEventPHID();
if ($instance_of) {
- if ($instance_of != $event->getPHID() || $event->getIsGhostEvent()) {
- $instance_of_event_phids[] = $event->getInstanceOfEventPHID();
- }
+ $instance_of_event_phids[] = $instance_of;
}
}
@@ -349,6 +359,7 @@
$recurring_events = id(new PhabricatorCalendarEventQuery())
->setViewer($viewer)
->withPHIDs($instance_of_event_phids)
+ ->withEventsWithNoParent(true)
->execute();
$recurring_events = mpull($recurring_events, null, 'getPHID');
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 15, 7:26 AM (3 d, 14 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6742483
Default Alt Text
D13140.id31735.diff (1 KB)
Attached To
Mode
D13140: Query for recurring event parents should accept a "not a child of anything" clause
Attached
Detach File
Event Timeline
Log In to Comment