diff --git a/src/applications/maniphest/editor/ManiphestTransactionEditorPro.php b/src/applications/maniphest/editor/ManiphestTransactionEditorPro.php index ed20c3bf7d..abff759e5c 100644 --- a/src/applications/maniphest/editor/ManiphestTransactionEditorPro.php +++ b/src/applications/maniphest/editor/ManiphestTransactionEditorPro.php @@ -28,6 +28,9 @@ final class ManiphestTransactionEditorPro switch ($xaction->getTransactionType()) { case ManiphestTransaction::TYPE_PRIORITY: + if ($this->getIsNewObject()) { + return null; + } return (int)$object->getPriority(); case ManiphestTransaction::TYPE_STATUS: if ($this->getIsNewObject()) { diff --git a/src/applications/maniphest/lipsum/PhabricatorManiphestTaskTestDataGenerator.php b/src/applications/maniphest/lipsum/PhabricatorManiphestTaskTestDataGenerator.php index 1d07ffbd4c..bf3573cbed 100644 --- a/src/applications/maniphest/lipsum/PhabricatorManiphestTaskTestDataGenerator.php +++ b/src/applications/maniphest/lipsum/PhabricatorManiphestTaskTestDataGenerator.php @@ -49,7 +49,7 @@ final class PhabricatorManiphestTaskTestDataGenerator ->setContinueOnNoEffect(true) ->setContinueOnMissingFields(true) ->applyTransactions($task, $transactions); - return $task->save(); + return $task; } public function getCCPHIDs() { diff --git a/src/applications/maniphest/storage/ManiphestTransaction.php b/src/applications/maniphest/storage/ManiphestTransaction.php index da14398f36..76ecc2cc61 100644 --- a/src/applications/maniphest/storage/ManiphestTransaction.php +++ b/src/applications/maniphest/storage/ManiphestTransaction.php @@ -78,6 +78,7 @@ final class ManiphestTransaction switch ($this->getTransactionType()) { case self::TYPE_TITLE: case self::TYPE_DESCRIPTION: + case self::TYPE_PRIORITY: if ($this->getOldValue() === null) { return true; } else { diff --git a/src/applications/pholio/lipsum/PhabricatorPholioMockTestDataGenerator.php b/src/applications/pholio/lipsum/PhabricatorPholioMockTestDataGenerator.php index 232ae91caf..0f0299d280 100644 --- a/src/applications/pholio/lipsum/PhabricatorPholioMockTestDataGenerator.php +++ b/src/applications/pholio/lipsum/PhabricatorPholioMockTestDataGenerator.php @@ -92,9 +92,18 @@ final class PhabricatorPholioMockTestDataGenerator ->loadAllWhere("mimeType = %s", "image/jpeg"); $rand_images = array(); $quantity = rand(2, 10); + $quantity = min($quantity, count($images)); foreach (array_rand($images, $quantity) as $random) { $rand_images[] = $images[$random]->getPHID(); } + // this means you don't have any jpegs yet. we'll + // just use a builtin image + if (empty($rand_images)) { + $default = PhabricatorFile::loadBuiltin( + PhabricatorUser::getOmnipotentUser(), + 'profile.png'); + $rand_images[] = $default->getPHID(); + } return $rand_images; }