Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15409352
D20271.id48407.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D20271.id48407.diff
View Options
diff --git a/src/applications/maniphest/controller/ManiphestController.php b/src/applications/maniphest/controller/ManiphestController.php
--- a/src/applications/maniphest/controller/ManiphestController.php
+++ b/src/applications/maniphest/controller/ManiphestController.php
@@ -37,29 +37,6 @@
return $crumbs;
}
- public function renderSingleTask(ManiphestTask $task) {
- $request = $this->getRequest();
- $user = $request->getUser();
-
- $phids = $task->getProjectPHIDs();
- if ($task->getOwnerPHID()) {
- $phids[] = $task->getOwnerPHID();
- }
-
- $handles = id(new PhabricatorHandleQuery())
- ->setViewer($user)
- ->withPHIDs($phids)
- ->execute();
-
- $view = id(new ManiphestTaskListView())
- ->setUser($user)
- ->setShowBatchControls(true)
- ->setHandles($handles)
- ->setTasks(array($task));
-
- return $view;
- }
-
final protected function newTaskGraphDropdownMenu(
ManiphestTask $task,
$has_parents,
diff --git a/src/applications/maniphest/editor/ManiphestEditEngine.php b/src/applications/maniphest/editor/ManiphestEditEngine.php
--- a/src/applications/maniphest/editor/ManiphestEditEngine.php
+++ b/src/applications/maniphest/editor/ManiphestEditEngine.php
@@ -379,7 +379,10 @@
$object,
array $xactions) {
- if ($request->isAjax()) {
+ $response_type = $request->getStr('responseType');
+ $is_card = ($response_type === 'card');
+
+ if ($is_card) {
// Reload the task to make sure we pick up the final task state.
$viewer = $this->getViewer();
$task = id(new ManiphestTaskQuery())
@@ -389,29 +392,12 @@
->needProjectPHIDs(true)
->executeOne();
- switch ($request->getStr('responseType')) {
- case 'card':
- return $this->buildCardResponse($task);
- default:
- return $this->buildListResponse($task);
- }
-
+ return $this->buildCardResponse($task);
}
return parent::newEditResponse($request, $object, $xactions);
}
- private function buildListResponse(ManiphestTask $task) {
- $controller = $this->getController();
-
- $payload = array(
- 'tasks' => $controller->renderSingleTask($task),
- 'data' => array(),
- );
-
- return id(new AphrontAjaxResponse())->setContent($payload);
- }
-
private function buildCardResponse(ManiphestTask $task) {
$controller = $this->getController();
$request = $controller->getRequest();
@@ -435,12 +421,26 @@
$board_phid = $column->getProjectPHID();
$object_phid = $task->getPHID();
- return id(new PhabricatorBoardResponseEngine())
+ $order = $request->getStr('order');
+ if ($order) {
+ $ordering = PhabricatorProjectColumnOrder::getOrderByKey($order);
+ $ordering = id(clone $ordering)
+ ->setViewer($viewer);
+ } else {
+ $ordering = null;
+ }
+
+ $engine = id(new PhabricatorBoardResponseEngine())
->setViewer($viewer)
->setBoardPHID($board_phid)
->setObjectPHID($object_phid)
- ->setVisiblePHIDs($visible_phids)
- ->buildResponse();
+ ->setVisiblePHIDs($visible_phids);
+
+ if ($ordering) {
+ $engine->setOrdering($ordering);
+ }
+
+ return $engine->buildResponse();
}
private function getColumnMap(ManiphestTask $task) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 20, 4:24 AM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7711166
Default Alt Text
D20271.id48407.diff (3 KB)
Attached To
Mode
D20271: When creating or editing a card on a sorted/grouped workboard, adjust headers appropriately
Attached
Detach File
Event Timeline
Log In to Comment