Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15395332
D8557.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D8557.id.diff
View Options
diff --git a/resources/sql/autopatches/20140317.mupdatedkey.sql b/resources/sql/autopatches/20140317.mupdatedkey.sql
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20140317.mupdatedkey.sql
@@ -0,0 +1,2 @@
+ALTER TABLE {$NAMESPACE}_maniphest.maniphest_task
+ ADD KEY `key_dateModified` (dateModified);
diff --git a/src/applications/maniphest/query/ManiphestTaskQuery.php b/src/applications/maniphest/query/ManiphestTaskQuery.php
--- a/src/applications/maniphest/query/ManiphestTaskQuery.php
+++ b/src/applications/maniphest/query/ManiphestTaskQuery.php
@@ -22,6 +22,8 @@
private $includeNoProject = null;
private $dateCreatedAfter;
private $dateCreatedBefore;
+ private $dateModifiedAfter;
+ private $dateModifiedBefore;
private $fullTextSearch = '';
@@ -153,6 +155,16 @@
return $this;
}
+ public function withDateModifiedBefore($date_modified_before) {
+ $this->dateModifiedBefore = $date_modified_before;
+ return $this;
+ }
+
+ public function withDateModifiedAfter($date_modified_after) {
+ $this->dateModifiedAfter = $date_modified_after;
+ return $this;
+ }
+
public function loadPage() {
// TODO: (T603) It is possible for a user to find the PHID of a project
@@ -193,6 +205,20 @@
$this->dateCreatedBefore);
}
+ if ($this->dateModifiedAfter) {
+ $where[] = qsprintf(
+ $conn,
+ 'dateModified >= %d',
+ $this->dateModifiedAfter);
+ }
+
+ if ($this->dateModifiedBefore) {
+ $where[] = qsprintf(
+ $conn,
+ 'dateModified <= %d',
+ $this->dateModifiedBefore);
+ }
+
$where[] = $this->buildPagingClause($conn);
$where = $this->formatWhereClause($where);
diff --git a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php
--- a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php
+++ b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php
@@ -64,6 +64,8 @@
$saved->setParameter('createdStart', $request->getStr('createdStart'));
$saved->setParameter('createdEnd', $request->getStr('createdEnd'));
+ $saved->setParameter('modifiedStart', $request->getStr('modifiedStart'));
+ $saved->setParameter('modifiedEnd', $request->getStr('modifiedEnd'));
$limit = $request->getInt('limit');
if ($limit > 0) {
@@ -170,6 +172,17 @@
$query->withDateCreatedBefore($end);
}
+ $mod_start = $this->parseDateTime($saved->getParameter('modifiedStart'));
+ $mod_end = $this->parseDateTime($saved->getParameter('modifiedEnd'));
+
+ if ($mod_start) {
+ $query->withDateModifiedAfter($mod_start);
+ }
+
+ if ($mod_end) {
+ $query->withDateModifiedBefore($mod_end);
+ }
+
$this->applyCustomFieldsToQuery($query, $saved);
return $query;
@@ -344,6 +357,14 @@
'createdEnd',
pht('Created Before'));
+ $this->buildDateRange(
+ $form,
+ $saved,
+ 'modifiedStart',
+ pht('Updated After'),
+ 'modifiedEnd',
+ pht('Updated Before'));
+
$form
->appendChild(
id(new AphrontFormTextControl())
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 17, 5:51 AM (1 w, 2 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7706755
Default Alt Text
D8557.id.diff (3 KB)
Attached To
Mode
D8557: Add "Date Updated" query fields for Maniphest
Attached
Detach File
Event Timeline
Log In to Comment