@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Despecialize status handling in Maniphest Reports

Summary: Ref T1812. This is mega gross but Facts is too far away to do this right for now.

Test Plan:
bleh gross

Looked at reports, saw same data as before.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T1812

Differential Revision: https://secure.phabricator.com/D8580

+36 -28
+16 -16
resources/celerity/map.php
··· 382 382 'rsrc/js/application/herald/HeraldRuleEditor.js' => '4173dbd8', 383 383 'rsrc/js/application/herald/PathTypeahead.js' => 'f7fc67ec', 384 384 'rsrc/js/application/herald/herald-rule-editor.js' => '7ebaeed3', 385 - 'rsrc/js/application/maniphest/behavior-batch-editor.js' => '391457d7', 385 + 'rsrc/js/application/maniphest/behavior-batch-editor.js' => 'fe80fb6d', 386 386 'rsrc/js/application/maniphest/behavior-batch-selector.js' => 'ead554ec', 387 387 'rsrc/js/application/maniphest/behavior-line-chart.js' => '64ef2fd2', 388 388 'rsrc/js/application/maniphest/behavior-list-edit.js' => 'cf76cfd5', ··· 573 573 'javelin-behavior-lightbox-attachments' => '3aa45ad9', 574 574 'javelin-behavior-line-chart' => '64ef2fd2', 575 575 'javelin-behavior-load-blame' => '42126667', 576 - 'javelin-behavior-maniphest-batch-editor' => '391457d7', 576 + 'javelin-behavior-maniphest-batch-editor' => 'fe80fb6d', 577 577 'javelin-behavior-maniphest-batch-selector' => 'ead554ec', 578 578 'javelin-behavior-maniphest-list-editor' => 'cf76cfd5', 579 579 'javelin-behavior-maniphest-subpriority-editor' => '84845b5b', ··· 1049 1049 3 => 'javelin-dom', 1050 1050 4 => 'phabricator-draggable-list', 1051 1051 ), 1052 - '391457d7' => 1053 - array( 1054 - 0 => 'javelin-behavior', 1055 - 1 => 'javelin-dom', 1056 - 2 => 'javelin-util', 1057 - 3 => 'phabricator-prefab', 1058 - 4 => 'multirow-row-manager', 1059 - 5 => 'javelin-json', 1060 - ), 1061 1052 '3aa45ad9' => 1062 1053 array( 1063 1054 0 => 'javelin-behavior', ··· 1234 1225 2 => 'javelin-util', 1235 1226 3 => 'phabricator-shaped-request', 1236 1227 ), 1237 - '7319e029' => 1238 - array( 1239 - 0 => 'javelin-behavior', 1240 - 1 => 'javelin-dom', 1241 - ), 1242 1228 '62e18640' => 1243 1229 array( 1244 1230 0 => 'javelin-install', ··· 1273 1259 0 => 'javelin-behavior', 1274 1260 1 => 'javelin-stratcom', 1275 1261 2 => 'javelin-dom', 1262 + ), 1263 + '7319e029' => 1264 + array( 1265 + 0 => 'javelin-behavior', 1266 + 1 => 'javelin-dom', 1276 1267 ), 1277 1268 '75903ee1' => 1278 1269 array( ··· 1971 1962 3 => 'javelin-request', 1972 1963 4 => 'phabricator-keyboard-shortcut', 1973 1964 5 => 'phabricator-notification', 1965 + ), 1966 + 'fe80fb6d' => 1967 + array( 1968 + 0 => 'javelin-behavior', 1969 + 1 => 'javelin-dom', 1970 + 2 => 'javelin-util', 1971 + 3 => 'phabricator-prefab', 1972 + 4 => 'multirow-row-manager', 1973 + 5 => 'javelin-json', 1974 1974 ), 1975 1975 28497740 => 1976 1976 array(
+20 -12
src/applications/maniphest/controller/ManiphestReportController.php
··· 111 111 $oldv = trim($row['oldValue'], '"'); 112 112 $newv = trim($row['newValue'], '"'); 113 113 114 - $old_is_open = ($oldv === (string)ManiphestTaskStatus::STATUS_OPEN); 115 - $new_is_open = ($newv === (string)ManiphestTaskStatus::STATUS_OPEN); 114 + if ($oldv == 'null') { 115 + $old_is_open = false; 116 + } else { 117 + $old_is_open = ManiphestTaskStatus::isOpenStatus($oldv); 118 + } 119 + 120 + $new_is_open = ManiphestTaskStatus::isOpenStatus($newv); 116 121 117 122 $is_open = ($new_is_open && !$old_is_open); 118 123 $is_close = ($old_is_open && !$new_is_open); ··· 650 655 $xtable = new ManiphestTransaction(); 651 656 $conn_r = $table->establishConnection('r'); 652 657 658 + // TODO: Gross. This table is not meant to be queried like this. Build 659 + // real stats tables. 660 + 661 + $open_status_list = array(); 662 + foreach (ManiphestTaskStatus::getOpenStatusConstants() as $constant) { 663 + $open_status_list[] = json_encode((int)$constant); 664 + $open_status_list[] = json_encode((string)$constant); 665 + } 666 + 653 667 $tasks = queryfx_all( 654 668 $conn_r, 655 669 'SELECT t.* FROM %T t JOIN %T x ON x.objectPHID = t.phid 656 670 WHERE t.status != 0 657 - AND x.oldValue IN (null, %s, %s) 658 - AND x.newValue NOT IN (%s, %s) 671 + AND x.oldValue IN (null, %Ls) 672 + AND x.newValue NOT IN (%Ls) 659 673 AND t.dateModified >= %d 660 674 AND x.dateCreated >= %d', 661 675 $table->getTableName(), 662 676 $xtable->getTableName(), 663 - 664 - // TODO: Gross. This table is not meant to be queried like this. Build 665 - // real stats tables. 666 - json_encode((int)ManiphestTaskStatus::STATUS_OPEN), 667 - json_encode((string)ManiphestTaskStatus::STATUS_OPEN), 668 - json_encode((int)ManiphestTaskStatus::STATUS_OPEN), 669 - json_encode((string)ManiphestTaskStatus::STATUS_OPEN), 670 - 677 + $open_status_list, 678 + $open_status_list, 671 679 $window_epoch, 672 680 $window_epoch); 673 681