diff --git a/resources/celerity/map.php b/resources/celerity/map.php --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -382,7 +382,7 @@ 'rsrc/js/application/herald/HeraldRuleEditor.js' => '4173dbd8', 'rsrc/js/application/herald/PathTypeahead.js' => 'f7fc67ec', 'rsrc/js/application/herald/herald-rule-editor.js' => '7ebaeed3', - 'rsrc/js/application/maniphest/behavior-batch-editor.js' => '391457d7', + 'rsrc/js/application/maniphest/behavior-batch-editor.js' => 'fe80fb6d', 'rsrc/js/application/maniphest/behavior-batch-selector.js' => 'ead554ec', 'rsrc/js/application/maniphest/behavior-line-chart.js' => '64ef2fd2', 'rsrc/js/application/maniphest/behavior-list-edit.js' => 'cf76cfd5', @@ -573,7 +573,7 @@ 'javelin-behavior-lightbox-attachments' => '3aa45ad9', 'javelin-behavior-line-chart' => '64ef2fd2', 'javelin-behavior-load-blame' => '42126667', - 'javelin-behavior-maniphest-batch-editor' => '391457d7', + 'javelin-behavior-maniphest-batch-editor' => 'fe80fb6d', 'javelin-behavior-maniphest-batch-selector' => 'ead554ec', 'javelin-behavior-maniphest-list-editor' => 'cf76cfd5', 'javelin-behavior-maniphest-subpriority-editor' => '84845b5b', @@ -1049,15 +1049,6 @@ 3 => 'javelin-dom', 4 => 'phabricator-draggable-list', ), - '391457d7' => - array( - 0 => 'javelin-behavior', - 1 => 'javelin-dom', - 2 => 'javelin-util', - 3 => 'phabricator-prefab', - 4 => 'multirow-row-manager', - 5 => 'javelin-json', - ), '3aa45ad9' => array( 0 => 'javelin-behavior', @@ -1234,11 +1225,6 @@ 2 => 'javelin-util', 3 => 'phabricator-shaped-request', ), - '7319e029' => - array( - 0 => 'javelin-behavior', - 1 => 'javelin-dom', - ), '62e18640' => array( 0 => 'javelin-install', @@ -1274,6 +1260,11 @@ 1 => 'javelin-stratcom', 2 => 'javelin-dom', ), + '7319e029' => + array( + 0 => 'javelin-behavior', + 1 => 'javelin-dom', + ), '75903ee1' => array( 0 => 'javelin-behavior', @@ -1972,6 +1963,15 @@ 4 => 'phabricator-keyboard-shortcut', 5 => 'phabricator-notification', ), + 'fe80fb6d' => + array( + 0 => 'javelin-behavior', + 1 => 'javelin-dom', + 2 => 'javelin-util', + 3 => 'phabricator-prefab', + 4 => 'multirow-row-manager', + 5 => 'javelin-json', + ), 28497740 => array( 0 => 'javelin-behavior', diff --git a/src/applications/maniphest/controller/ManiphestReportController.php b/src/applications/maniphest/controller/ManiphestReportController.php --- a/src/applications/maniphest/controller/ManiphestReportController.php +++ b/src/applications/maniphest/controller/ManiphestReportController.php @@ -111,8 +111,13 @@ $oldv = trim($row['oldValue'], '"'); $newv = trim($row['newValue'], '"'); - $old_is_open = ($oldv === (string)ManiphestTaskStatus::STATUS_OPEN); - $new_is_open = ($newv === (string)ManiphestTaskStatus::STATUS_OPEN); + if ($oldv == 'null') { + $old_is_open = false; + } else { + $old_is_open = ManiphestTaskStatus::isOpenStatus($oldv); + } + + $new_is_open = ManiphestTaskStatus::isOpenStatus($newv); $is_open = ($new_is_open && !$old_is_open); $is_close = ($old_is_open && !$new_is_open); @@ -650,24 +655,27 @@ $xtable = new ManiphestTransaction(); $conn_r = $table->establishConnection('r'); + // TODO: Gross. This table is not meant to be queried like this. Build + // real stats tables. + + $open_status_list = array(); + foreach (ManiphestTaskStatus::getOpenStatusConstants() as $constant) { + $open_status_list[] = json_encode((int)$constant); + $open_status_list[] = json_encode((string)$constant); + } + $tasks = queryfx_all( $conn_r, 'SELECT t.* FROM %T t JOIN %T x ON x.objectPHID = t.phid WHERE t.status != 0 - AND x.oldValue IN (null, %s, %s) - AND x.newValue NOT IN (%s, %s) + AND x.oldValue IN (null, %Ls) + AND x.newValue NOT IN (%Ls) AND t.dateModified >= %d AND x.dateCreated >= %d', $table->getTableName(), $xtable->getTableName(), - - // TODO: Gross. This table is not meant to be queried like this. Build - // real stats tables. - json_encode((int)ManiphestTaskStatus::STATUS_OPEN), - json_encode((string)ManiphestTaskStatus::STATUS_OPEN), - json_encode((int)ManiphestTaskStatus::STATUS_OPEN), - json_encode((string)ManiphestTaskStatus::STATUS_OPEN), - + $open_status_list, + $open_status_list, $window_epoch, $window_epoch);