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

Give audit statuses API constants that match their UI strings

Summary: Ref T13631. These strings were a little inconsistent; make them more consistent.

Test Plan: Called `diffusion.commit.search` with the appropriate attachment, saw slightly more consistent statuses.

Maniphest Tasks: T13631

Differential Revision: https://secure.phabricator.com/D21600
This commit is contained in:
epriestley 2021-03-10 09:33:49 -08:00
parent ac2f5a1046
commit 404b55ce57
2 changed files with 11 additions and 2 deletions

View file

@ -37,6 +37,10 @@ final class PhabricatorAuditRequestStatus extends Phobject {
return $this->key; return $this->key;
} }
public function getStatusValueForConduit() {
return $this->getMapProperty('value.conduit');
}
public function isResigned() { public function isResigned() {
return ($this->key === self::RESIGNED); return ($this->key === self::RESIGNED);
} }
@ -53,26 +57,31 @@ final class PhabricatorAuditRequestStatus extends Phobject {
'name' => pht('Audit Required'), 'name' => pht('Audit Required'),
'icon' => 'fa-exclamation-circle', 'icon' => 'fa-exclamation-circle',
'icon.color' => 'orange', 'icon.color' => 'orange',
'value.conduit' => 'audit-required',
), ),
self::AUDIT_REQUESTED => array( self::AUDIT_REQUESTED => array(
'name' => pht('Audit Requested'), 'name' => pht('Audit Requested'),
'icon' => 'fa-exclamation-circle', 'icon' => 'fa-exclamation-circle',
'icon.color' => 'orange', 'icon.color' => 'orange',
'value.conduit' => 'audit-requested',
), ),
self::CONCERNED => array( self::CONCERNED => array(
'name' => pht('concern Raised'), 'name' => pht('Concern Raised'),
'icon' => 'fa-times-circle', 'icon' => 'fa-times-circle',
'icon.color' => 'red', 'icon.color' => 'red',
'value.conduit' => 'concern-raised',
), ),
self::ACCEPTED => array( self::ACCEPTED => array(
'name' => pht('Accepted'), 'name' => pht('Accepted'),
'icon' => 'fa-check-circle', 'icon' => 'fa-check-circle',
'icon.color' => 'green', 'icon.color' => 'green',
'value.conduit' => 'accepted',
), ),
self::RESIGNED => array( self::RESIGNED => array(
'name' => pht('Resigned'), 'name' => pht('Resigned'),
'icon' => 'fa-times', 'icon' => 'fa-times',
'icon.color' => 'grey', 'icon.color' => 'grey',
'value.conduit' => 'resigned',
), ),
); );
} }

View file

@ -24,7 +24,7 @@ final class DiffusionAuditorsSearchEngineAttachment
$list[] = array( $list[] = array(
'auditorPHID' => $auditor->getAuditorPHID(), 'auditorPHID' => $auditor->getAuditorPHID(),
'status' => $status->getStatusValue(), 'status' => $status->getStatusValueForConduit(),
); );
} }