@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Correct Conduit project.search color result for milestones

Summary:
Using `project.search` in Conduit to search for a milestone project, the `color` values returned are always default `blue` as a milestone itself cannot have a custom color on its own.
This is inconsistent as the UI uses the color of the milestone's parent project, for example under "Looks like" on `/project/manage/2/` and under "Tags" on `/T1`.

Closes T16088

Test Plan:
1. Go to http://phorge.localhost/project/edit/form/default/
2. Set "Color" to "Pink"
3. Click "Create New Project"
4. Click "Subprojects" in the left panel on resulting http://phorge.localhost/project/subprojects/1/
5. Click "Create Milestone" in the right panel
6. On the "Create Project" page, see that you cannot choose an icon or color.
7. Enter a "Name" and click "Create New Project"
8. On resulting http://phorge.localhost/project/view/2/, see that the milestone tag under "Looks Like" is also Pink like the parent project
9. Go to http://phorge.localhost/conduit/method/project.search/
10. In the "constraints" field, enter `{"ids": [2]}`
11. Check the `color` output under "Method Result"

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: A_smart_kitten, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16088

Differential Revision: https://we.phorge.it/D26043

+1 -1
+1 -1
src/applications/project/storage/PhabricatorProject.php
··· 815 815 } 816 816 817 817 public function getFieldValuesForConduit() { 818 - $color_key = $this->getColor(); 818 + $color_key = $this->getDisplayColor(); 819 819 $color_name = PhabricatorProjectIconSet::getColorName($color_key); 820 820 821 821 if ($this->isMilestone()) {