Page MenuHomePhabricator

D19207.diff
No OneTemporary

D19207.diff

diff --git a/resources/sql/autopatches/20180309.owners.01.primaryowner.sql b/resources/sql/autopatches/20180309.owners.01.primaryowner.sql
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20180309.owners.01.primaryowner.sql
@@ -0,0 +1,2 @@
+ALTER TABLE {$NAMESPACE}_owners.owners_package
+ DROP primaryOwnerPHID;
diff --git a/src/applications/owners/storage/PhabricatorOwnersPackage.php b/src/applications/owners/storage/PhabricatorOwnersPackage.php
--- a/src/applications/owners/storage/PhabricatorOwnersPackage.php
+++ b/src/applications/owners/storage/PhabricatorOwnersPackage.php
@@ -16,7 +16,6 @@
protected $auditingEnabled;
protected $autoReview;
protected $description;
- protected $primaryOwnerPHID;
protected $mailKey;
protected $status;
protected $viewPolicy;
@@ -122,7 +121,6 @@
self::CONFIG_COLUMN_SCHEMA => array(
'name' => 'sort',
'description' => 'text',
- 'primaryOwnerPHID' => 'phid?',
'auditingEnabled' => 'bool',
'mailKey' => 'bytes20',
'status' => 'text32',
@@ -601,6 +599,18 @@
->setKey('owners')
->setType('list<map<string, wild>>')
->setDescription(pht('List of package owners.')),
+ id(new PhabricatorConduitSearchFieldSpecification())
+ ->setKey('review')
+ ->setType('map<string, wild>')
+ ->setDescription(pht('Auto review information.')),
+ id(new PhabricatorConduitSearchFieldSpecification())
+ ->setKey('audit')
+ ->setType('map<string, wild>')
+ ->setDescription(pht('Auto audit information.')),
+ id(new PhabricatorConduitSearchFieldSpecification())
+ ->setKey('dominion')
+ ->setType('string')
+ ->setDescription(pht('Dominion setting.')),
);
}
@@ -612,11 +622,40 @@
);
}
+ $review_map = self::getAutoreviewOptionsMap();
+ $review_value = $this->getAutoReview();
+ if (isset($review_map[$review_value])) {
+ $review_label = $review_map[$review_value]['name'];
+ } else {
+ $review_label = pht('Unknown ("%s")', $review_value);
+ }
+
+ $review = array(
+ 'value' => $review_value,
+ 'label' => $review_label,
+ );
+
+ if ($this->getAuditingEnabled()) {
+ $audit_value = 'audit';
+ $audit_label = pht('Auditing Enabled');
+ } else {
+ $audit_value = 'none';
+ $audit_label = pht('No Auditing');
+ }
+
+ $audit = array(
+ 'value' => $audit_value,
+ 'label' => $audit_label,
+ );
+
return array(
'name' => $this->getName(),
'description' => $this->getDescription(),
'status' => $this->getStatus(),
'owners' => $owner_list,
+ 'review' => $review,
+ 'audit' => $audit,
+ 'dominion' => $this->getDominion(),
);
}

File Metadata

Mime Type
text/plain
Expires
Sun, Mar 23, 1:33 AM (1 d, 3 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7704551
Default Alt Text
D19207.diff (2 KB)

Event Timeline