Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14045658
D14935.id36078.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D14935.id36078.diff
View Options
diff --git a/src/applications/project/controller/PhabricatorProjectBoardViewController.php b/src/applications/project/controller/PhabricatorProjectBoardViewController.php
--- a/src/applications/project/controller/PhabricatorProjectBoardViewController.php
+++ b/src/applications/project/controller/PhabricatorProjectBoardViewController.php
@@ -339,6 +339,7 @@
$can_edit = idx($task_can_edit_map, $task->getPHID(), false);
$cards->addItem(id(new ProjectBoardTaskCard())
->setViewer($viewer)
+ ->setProject($project)
->setTask($task)
->setOwner($owner)
->setCanEdit($can_edit)
diff --git a/src/applications/project/view/ProjectBoardTaskCard.php b/src/applications/project/view/ProjectBoardTaskCard.php
--- a/src/applications/project/view/ProjectBoardTaskCard.php
+++ b/src/applications/project/view/ProjectBoardTaskCard.php
@@ -3,6 +3,7 @@
final class ProjectBoardTaskCard extends Phobject {
private $viewer;
+ private $project;
private $task;
private $owner;
private $canEdit;
@@ -15,6 +16,14 @@
return $this->viewer;
}
+ public function setProject(PhabricatorProject $project) {
+ $this->project = $project;
+ return $this;
+ }
+ public function getProject() {
+ return $this->task;
+ }
+
public function setTask(ManiphestTask $task) {
$this->task = $task;
return $this;
@@ -44,13 +53,14 @@
$task = $this->getTask();
$owner = $this->getOwner();
$can_edit = $this->getCanEdit();
+ $viewer = $this->getViewer();
$color_map = ManiphestTaskPriority::getColorMap();
$bar_color = idx($color_map, $task->getPriority(), 'grey');
$card = id(new PHUIObjectItemView())
->setObject($task)
- ->setUser($this->getViewer())
+ ->setUser($viewer)
->setObjectName('T'.$task->getID())
->setHeader($task->getTitle())
->setGrippable($can_edit)
@@ -73,6 +83,16 @@
$card->addAttribute($owner->renderLink());
}
+ $handles = array_select_keys(
+ iterator_to_array($viewer->loadHandles($task->getProjectPHIDs())),
+ $task->getProjectPHIDs());
+ unset($handles[$this->project->getPHID()]);
+
+ $tag_list = id(new PHUIHandleTagListView())
+ ->setSlim(true)
+ ->setHandles($handles);
+ $card->addAttribute($tag_list);
+
return $card;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 14, 7:57 AM (4 d, 22 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6743769
Default Alt Text
D14935.id36078.diff (2 KB)
Attached To
Mode
D14935: Add project tags to workboard cards
Attached
Detach File
Event Timeline
Log In to Comment