Page MenuHomePhabricator

Indicate WIP status of patches on Phabricator patch list
Closed, ResolvedPublic

Description

Phabricator lists the Gerrit patches associated with a task, with icons indicating status such as comments or negative reviews (T229934: Enable semantic relationship between code review changesets and maniphest tasks in phabricator (show "Related Gerrit Patches")) which is an extremely useful feature, but it does not show the WIP status of patches. Like negative reviews etc., WIP status is important for knowing whether a patch requires action; it would be nice if it resulted in a different icon.

Details

TitleReferenceAuthorSource BranchDest Branch
Indicate WIP status of Gerrit patchesrepos/phabricator/extensions!21aklapperT325239wmf/stable
Indicate WIP status of Gerrit patchesrepos/phabricator/extensions!10aklapperaklapper-wmf/stable-patch-83645wmf/stable
Customize query in GitLab

Event Timeline

I believe the code integrating Gerrit changes inside Phabricator to be https://gitlab.wikimedia.org/repos/phabricator/extensions/-/blob/wmf/stable/src/customfields/GerritPatchesCustomField.php.

The code hits the Query Change API which yields a list of ChangeInfo objects.

When the patch is a work in progress, an extra field is set work_in_progress, else the field is absent.

So I guess the condition can be array_key_exists( 'work_in_progress', $change ) and maybe append the text WIP to the icon.

Note to myself: The GitLab UI when deleting personal projects is not particularly clear when it displays "0 patches, 0 issues, 0 etc" etc. I did not realize that this message does not cover open merge requests for the main branch, so I need to re-do this patch...

brennen subscribed.

Tested locally, will deploy with next Phabricator/Phorge update.