1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-28 08:20:57 +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;
}
public function getStatusValueForConduit() {
return $this->getMapProperty('value.conduit');
}
public function isResigned() {
return ($this->key === self::RESIGNED);
}
@ -53,26 +57,31 @@ final class PhabricatorAuditRequestStatus extends Phobject {
'name' => pht('Audit Required'),
'icon' => 'fa-exclamation-circle',
'icon.color' => 'orange',
'value.conduit' => 'audit-required',
),
self::AUDIT_REQUESTED => array(
'name' => pht('Audit Requested'),
'icon' => 'fa-exclamation-circle',
'icon.color' => 'orange',
'value.conduit' => 'audit-requested',
),
self::CONCERNED => array(
'name' => pht('concern Raised'),
'name' => pht('Concern Raised'),
'icon' => 'fa-times-circle',
'icon.color' => 'red',
'value.conduit' => 'concern-raised',
),
self::ACCEPTED => array(
'name' => pht('Accepted'),
'icon' => 'fa-check-circle',
'icon.color' => 'green',
'value.conduit' => 'accepted',
),
self::RESIGNED => array(
'name' => pht('Resigned'),
'icon' => 'fa-times',
'icon.color' => 'grey',
'value.conduit' => 'resigned',
),
);
}

View file

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