Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13989148
D8734.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D8734.id.diff
View Options
diff --git a/src/applications/maniphest/conduit/ConduitAPI_maniphest_Method.php b/src/applications/maniphest/conduit/ConduitAPI_maniphest_Method.php
--- a/src/applications/maniphest/conduit/ConduitAPI_maniphest_Method.php
+++ b/src/applications/maniphest/conduit/ConduitAPI_maniphest_Method.php
@@ -265,6 +265,8 @@
'isClosed' => $task->isClosed(),
'priority' => ManiphestTaskPriority::getTaskPriorityName(
$task->getPriority()),
+ 'priorityColor' => ManiphestTaskPriority::getTaskPriorityColor(
+ $task->getPriority()),
'title' => $task->getTitle(),
'description' => $task->getDescription(),
'projectPHIDs' => $task->getProjectPHIDs(),
diff --git a/src/applications/maniphest/constants/ManiphestTaskPriority.php b/src/applications/maniphest/constants/ManiphestTaskPriority.php
--- a/src/applications/maniphest/constants/ManiphestTaskPriority.php
+++ b/src/applications/maniphest/constants/ManiphestTaskPriority.php
@@ -64,6 +64,17 @@
return idx(self::getTaskPriorityMap(), $priority, $priority);
}
+ /**
+ * Retrieve the color of the priority level given
+ *
+ * @param int A priority level.
+ * @return string The color of the priority if the level is valid,
+ * or black if it is not.
+ */
+ public static function getTaskPriorityColor($priority) {
+ return idx(self::getColorMap(), $priority, 'black');
+ }
+
private static function getConfig() {
$config = PhabricatorEnv::getEnvConfig('maniphest.priorities');
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Oct 22, 6:25 PM (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6741383
Default Alt Text
D8734.id.diff (1 KB)
Attached To
Mode
D8734: Add a priorityColor property to the maniphest conduit endpoint
Attached
Detach File
Event Timeline
Log In to Comment