1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 16:22:43 +01:00

Conduit column.search: add status, sequence and isDefault to API results

Summary:
This seems like a fairly obvious oversight with the column.search API.

Knowing:

1. isHidden - boolean to indicate Active vs Archived
2. isDefaultColumn - the one that Tasks get dropped in by default, usually called "Backlog"
3. sequence - numerical order on the Workboard

are all necessary for a lot of things that very sensible real-world API clients need to do when working with columns.

Partial cherry-pick from:

https://phabricator.wikimedia.org/rPHABebfe30890b52784d222ec4ed36c05462b2a57f92

Closes T15484

Test Plan:
Tested on phabricator.wikimedia.org over many months and used by real client apps.

To do additional tests, visit this page:

/conduit/method/project.column.search/

Check that the new fields are returned correctly and nothing explodes.

Reviewers: #blessed_committers, O1 Blessed Committers, 0, avivey, valerio.bozzolan

Reviewed By: #blessed_committers, O1 Blessed Committers, 0, valerio.bozzolan

Subscribers: Cigaryno, 0, speck, tobiaswiese, valerio.bozzolan, Matthew

Maniphest Tasks: T15081, T15484

Differential Revision: https://we.phorge.it/D25038
This commit is contained in:
Mukunda Modell 2023-06-19 08:54:32 +02:00 committed by Valerio Bozzolan
parent 478012cd46
commit 327ac921c2

View file

@ -271,6 +271,19 @@ final class PhabricatorProjectColumn
pht( pht(
'For columns that proxy another object (like a subproject or '. 'For columns that proxy another object (like a subproject or '.
'milestone), the PHID of the object they proxy.')), 'milestone), the PHID of the object they proxy.')),
id(new PhabricatorConduitSearchFieldSpecification())
->setKey('isHidden')
->setType('bool')
->setDescription(pht('True if this column is hidden.')),
id(new PhabricatorConduitSearchFieldSpecification())
->setKey('isDefaultColumn')
->setType('bool')
->setDescription(pht('True if this is the default column.')),
id(new PhabricatorConduitSearchFieldSpecification())
->setKey('sequence')
->setType('int')
->setDescription(
pht('The sequence in which this column appears on the workboard.')),
); );
} }
@ -279,6 +292,9 @@ final class PhabricatorProjectColumn
'name' => $this->getDisplayName(), 'name' => $this->getDisplayName(),
'proxyPHID' => $this->getProxyPHID(), 'proxyPHID' => $this->getProxyPHID(),
'project' => $this->getProject()->getRefForConduit(), 'project' => $this->getProject()->getRefForConduit(),
'isHidden' => $this->isHidden(),
'isDefaultColumn' => $this->isDefaultColumn(),
'sequence' => (int)$this->getSequence(),
); );
} }