Page MenuHomePhabricator

D13098.id31686.diff
No OneTemporary

D13098.id31686.diff

Index: src/applications/project/conduit/ProjectCreateConduitAPIMethod.php
===================================================================
--- src/applications/project/conduit/ProjectCreateConduitAPIMethod.php
+++ src/applications/project/conduit/ProjectCreateConduitAPIMethod.php
@@ -14,6 +14,9 @@
return array(
'name' => 'required string',
'members' => 'optional list<phid>',
+ 'icon' => 'optional string',
+ 'color' => 'optional string',
+ 'tags' => 'optional list<string>',
);
}
@@ -37,6 +40,24 @@
->setTransactionType($type_name)
->setNewValue($request->getValue('name'));
+ if ($request->getValue('icon')) {
+ $xactions[] = id(new PhabricatorProjectTransaction())
+ ->setTransactionType(PhabricatorProjectTransaction::TYPE_ICON)
+ ->setNewValue($request->getValue('icon'));
+ }
+
+ if ($request->getValue('color')) {
+ $xactions[] = id(new PhabricatorProjectTransaction())
+ ->setTransactionType(PhabricatorProjectTransaction::TYPE_COLOR)
+ ->setNewValue($request->getValue('color'));
+ }
+
+ if ($request->getValue('tags')) {
+ $xactions[] = id(new PhabricatorProjectTransaction())
+ ->setTransactionType(PhabricatorProjectTransaction::TYPE_SLUGS)
+ ->setNewValue($request->getValue('tags'));
+ }
+
$xactions[] = id(new PhabricatorProjectTransaction())
->setTransactionType(PhabricatorTransactions::TYPE_EDGE)
->setMetadataValue(
Index: src/applications/project/conduit/ProjectQueryConduitAPIMethod.php
===================================================================
--- src/applications/project/conduit/ProjectQueryConduitAPIMethod.php
+++ src/applications/project/conduit/ProjectQueryConduitAPIMethod.php
@@ -27,6 +27,8 @@
'names' => 'optional list<string>',
'phids' => 'optional list<phid>',
'slugs' => 'optional list<string>',
+ 'icons' => 'optional list<string>',
+ 'colors' => 'optional list<string>',
'status' => 'optional '.$status_const,
'members' => 'optional list<phid>',
@@ -71,6 +73,22 @@
$query->withSlugs($slugs);
}
+ $request->getValue('icons');
+ if ($request->getValue('icons')) {
+ $icons = array();
+ // the internal 'fa-' prefix is a detail hidden from api clients
+ // but needs to pre prepended to the values in the icons array:
+ foreach ($request->getValue('icons') as $value) {
+ $icons[] = 'fa-'.$value;
+ }
+ $query->withIcons($icons);
+ }
+
+ $colors = $request->getValue('colors');
+ if ($colors) {
+ $query->withColors($colors);
+ }
+
$members = $request->getValue('members');
if ($members) {
$query->withMemberPHIDs($members);

File Metadata

Mime Type
text/plain
Expires
Sun, Mar 16, 5:07 PM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7707385
Default Alt Text
D13098.id31686.diff (2 KB)

Event Timeline