Christopher Johnson (WMDE) has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/181784

Change subject: fix subtask creation problem
......................................................................

fix subtask creation problem

Directly related to new ManiphestTaskQuery implementation for
Bug: T85060

Change-Id: I7bc715f91847eb7be3a4a2c3f4cf3eba20e274c8
---
M src/customfield/SprintTaskStoryPointsField.php
1 file changed, 8 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/phabricator/extensions/Sprint 
refs/changes/84/181784/1

diff --git a/src/customfield/SprintTaskStoryPointsField.php 
b/src/customfield/SprintTaskStoryPointsField.php
index 705b12a..123c204 100644
--- a/src/customfield/SprintTaskStoryPointsField.php
+++ b/src/customfield/SprintTaskStoryPointsField.php
@@ -19,7 +19,6 @@
         'name' => $this->getFieldName(),
         'description' => $this->getFieldDescription(),
       ));
-
     $this->setProxy($this->text_proxy);
   }
 
@@ -52,12 +51,14 @@
 
      if ($this->getObject() instanceof ManiphestTask) {
        $id = $this->getObject()->getID();
-       $task = id(new ManiphestTaskQuery())
-           ->setViewer($viewer)
-           ->withIds(array($id))
-           ->needProjectPHIDs(true)
-           ->executeOne();
-       $project_phids = $task->getProjectPHIDs();
+       if ($id) {
+          $task = id(new ManiphestTaskQuery())
+             ->setViewer($viewer)
+             ->withIds(array($id))
+             ->needProjectPHIDs(true)
+             ->executeOne();
+          $project_phids = $task->getProjectPHIDs();
+       }
      }
 
       if (empty($project_phids)) {

-- 
To view, visit https://gerrit.wikimedia.org/r/181784
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7bc715f91847eb7be3a4a2c3f4cf3eba20e274c8
Gerrit-PatchSet: 1
Gerrit-Project: phabricator/extensions/Sprint
Gerrit-Branch: master
Gerrit-Owner: Christopher Johnson (WMDE) <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to