Route Maniphest comments/detail edits through new code

Summary: Ref T2217. When you add comments (or use that interface to make updates), ship it through the new code.

Test Plan: Added comments, made other changes to Maniphest tasks.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2217

Differential Revision: https://secure.phabricator.com/D7088
This commit is contained in:
epriestley
2013-09-23 14:33:09 -07:00
parent 2a78767a4a
commit bf14bb45f1
4 changed files with 36 additions and 37 deletions

View File

@@ -78,17 +78,19 @@ final class ManiphestTransactionPreviewController extends ManiphestController {
case ManiphestTransactionType::TYPE_PROJECTS:
if ($value) {
$value = json_decode($value);
$phids = $value;
foreach ($task->getProjectPHIDs() as $project_phid) {
$phids[] = $project_phid;
$value[] = $project_phid;
}
$transaction->setNewValue($value);
} else {
$phids = array();
$transaction->setNewValue(array());
}
if (!$value) {
$value = array();
}
$phids = $value;
foreach ($task->getProjectPHIDs() as $project_phid) {
$phids[] = $project_phid;
$value[] = $project_phid;
}
$transaction->setOldValue($task->getProjectPHIDs());
$transaction->setNewValue($value);
break;
default:
$phids = array();