Page MenuHomestyx hydra

No OneTemporary

diff --git a/src/applications/audit/constants/PhabricatorAuditRequestStatus.php b/src/applications/audit/constants/PhabricatorAuditRequestStatus.php
index e3fb188a14..ea0c496df0 100644
--- a/src/applications/audit/constants/PhabricatorAuditRequestStatus.php
+++ b/src/applications/audit/constants/PhabricatorAuditRequestStatus.php
@@ -1,80 +1,89 @@
<?php
final class PhabricatorAuditRequestStatus extends Phobject {
const AUDIT_REQUIRED = 'audit-required';
const CONCERNED = 'concerned';
const ACCEPTED = 'accepted';
const AUDIT_REQUESTED = 'requested';
const RESIGNED = 'resigned';
private $key;
public static function newForStatus($status) {
$result = new self();
$result->key = $status;
return $result;
}
public function getIconIcon() {
return $this->getMapProperty('icon');
}
public function getIconColor() {
return $this->getMapProperty('icon.color');
}
public function getStatusName() {
$name = $this->getMapProperty('name');
if ($name !== null) {
return $name;
}
return pht('Unknown Audit Request Status ("%s")', $this->key);
}
public function getStatusValue() {
return $this->key;
}
+ public function getStatusValueForConduit() {
+ return $this->getMapProperty('value.conduit');
+ }
+
public function isResigned() {
return ($this->key === self::RESIGNED);
}
private function getMapProperty($key, $default = null) {
$map = self::newStatusMap();
$spec = idx($map, $this->key, array());
return idx($spec, $key, $default);
}
private static function newStatusMap() {
return array(
self::AUDIT_REQUIRED => array(
'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',
),
);
}
}
diff --git a/src/applications/diffusion/engineextension/DiffusionAuditorsSearchEngineAttachment.php b/src/applications/diffusion/engineextension/DiffusionAuditorsSearchEngineAttachment.php
index 1dfcbcc05b..6023e8b678 100644
--- a/src/applications/diffusion/engineextension/DiffusionAuditorsSearchEngineAttachment.php
+++ b/src/applications/diffusion/engineextension/DiffusionAuditorsSearchEngineAttachment.php
@@ -1,36 +1,36 @@
<?php
final class DiffusionAuditorsSearchEngineAttachment
extends PhabricatorSearchEngineAttachment {
public function getAttachmentName() {
return pht('Diffusion Auditors');
}
public function getAttachmentDescription() {
return pht('Get the auditors for each commit.');
}
public function willLoadAttachmentData($query, $spec) {
$query->needAuditRequests(true);
}
public function getAttachmentForObject($object, $data, $spec) {
$auditors = $object->getAudits();
$list = array();
foreach ($auditors as $auditor) {
$status = $auditor->getAuditRequestStatusObject();
$list[] = array(
'auditorPHID' => $auditor->getAuditorPHID(),
- 'status' => $status->getStatusValue(),
+ 'status' => $status->getStatusValueForConduit(),
);
}
return array(
'auditors' => $list,
);
}
}

File Metadata

Mime Type
text/x-diff
Expires
Sun, Nov 24, 12:54 PM (1 d, 16 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1016
Default Alt Text
(4 KB)

Event Timeline