Page MenuHomePhabricator

D19557.id46758.diff
No OneTemporary

D19557.id46758.diff

diff --git a/src/applications/herald/typeahead/HeraldRuleDatasource.php b/src/applications/herald/typeahead/HeraldRuleDatasource.php
--- a/src/applications/herald/typeahead/HeraldRuleDatasource.php
+++ b/src/applications/herald/typeahead/HeraldRuleDatasource.php
@@ -19,10 +19,18 @@
$viewer = $this->getViewer();
$raw_query = $this->getRawQuery();
- $rules = id(new HeraldRuleQuery())
- ->setViewer($viewer)
- ->withDatasourceQuery($raw_query)
- ->execute();
+ $query = id(new HeraldRuleQuery())
+ ->setViewer($viewer);
+
+ if (preg_match('/^[hH]\d+\z/', $raw_query)) {
+ $id = trim($raw_query, 'hH');
+ $id = (int)$id;
+ $query->withIDs(array($id));
+ } else {
+ $query->withDatasourceQuery($raw_query);
+ }
+
+ $rules = $query->execute();
$handles = id(new PhabricatorHandleQuery())
->setViewer($viewer)

File Metadata

Mime Type
text/plain
Expires
Wed, Mar 19, 8:33 PM (2 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7638461
Default Alt Text
D19557.id46758.diff (891 B)

Event Timeline