Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15386051
D19207.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D19207.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 15, 11:57 PM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7704551
Default Alt Text
D19207.diff (2 KB)
Attached To
Mode
D19207: Add audit, review, and dominion information to "owners.search" API method
Attached
Detach File
Event Timeline
Log In to Comment