From 713f8fb373e4f8b97d7a5dbe51d2e40c0fcec7ba Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 2 Nov 2016 11:31:57 -0700 Subject: [PATCH] Fix a bug which could cause imported events to set themselves as their own parents Summary: Ref T11808. This variable is wrong, and would sometimes cause events to set themsevles as their own parents. They would then fail to load, and disrupt cursor paging. Test Plan: - Reproduced T11808 locally by reloading test data 2+ times, creating events with themselves as their own parents. - Appplied fix. - Nuked data, reloaded, no more self-parents. - Test datafile: {F1894017} Reviewers: chad Reviewed By: chad Maniphest Tasks: T11808 Differential Revision: https://secure.phabricator.com/D16793 --- .../calendar/import/PhabricatorCalendarImportEngine.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/calendar/import/PhabricatorCalendarImportEngine.php b/src/applications/calendar/import/PhabricatorCalendarImportEngine.php index bf2200b981..eafa8e332f 100644 --- a/src/applications/calendar/import/PhabricatorCalendarImportEngine.php +++ b/src/applications/calendar/import/PhabricatorCalendarImportEngine.php @@ -331,7 +331,7 @@ abstract class PhabricatorCalendarImportEngine foreach ($update_map as $full_uid => $event) { $parent_uid = $this->getParentNodeUID($node_map[$full_uid]); if ($parent_uid) { - $parent_phid = $update_map[$full_uid]->getPHID(); + $parent_phid = $update_map[$parent_uid]->getPHID(); } else { $parent_phid = null; }