@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.

Update batch edit and export to excel for "pro" queries

Summary: Point these at the new data and URIs.

Test Plan:
- Batch edited some tasks.
- Exported some tasks to excel.

{F58112}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

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

+20 -17
+1 -1
src/applications/maniphest/controller/ManiphestBatchEditController.php
··· 33 33 $task_ids = implode(',', mpull($tasks, 'getID')); 34 34 35 35 return id(new AphrontRedirectResponse()) 36 - ->setURI('/maniphest/view/custom/?s=oc&tasks='.$task_ids); 36 + ->setURI('/maniphest/query/?ids='.$task_ids); 37 37 } 38 38 39 39 $panel = new AphrontPanelView();
+19 -16
src/applications/maniphest/controller/ManiphestExportController.php
··· 55 55 // TODO: PHPExcel has a dependency on the PHP zip extension. We should test 56 56 // for that here, since it fatals if we don't have the ZipArchive class. 57 57 58 - $query = id(new PhabricatorSearchQuery())->loadOneWhere( 59 - 'queryKey = %s', 60 - $this->key); 61 - if (!$query) { 58 + $saved = id(new PhabricatorSavedQueryQuery()) 59 + ->setViewer($user) 60 + ->withQueryKeys(array($this->key)) 61 + ->executeOne(); 62 + if (!$saved) { 62 63 return new Aphront404Response(); 63 64 } 64 65 ··· 88 89 $dialog->addCancelButton('/maniphest/'); 89 90 $dialog->addSubmitButton(pht('Export to Excel')); 90 91 return id(new AphrontDialogResponse())->setDialog($dialog); 91 - 92 92 } 93 93 94 94 $format = idx($formats, $request->getStr("excel-format")); ··· 96 96 throw new Exception('Excel format object not found.'); 97 97 } 98 98 99 - $query->setParameter('limit', null); 100 - $query->setParameter('offset', null); 101 - $query->setParameter('order', 'p'); 102 - $query->setParameter('group', 'n'); 99 + $saved->makeEphemeral(); 100 + $saved->setParameter('limit', PHP_INT_MAX); 103 101 104 - list($tasks, $handles) = ManiphestTaskListController::loadTasks( 105 - $query, 106 - $user); 107 - // Ungroup tasks. 108 - $tasks = array_mergev($tasks); 102 + $engine = id(new ManiphestTaskSearchEngine()) 103 + ->setViewer($user); 104 + 105 + $query = $engine->buildQueryFromSavedQuery($saved); 106 + $query->setViewer($user); 107 + $tasks = $query->execute(); 109 108 110 109 $all_projects = array_mergev(mpull($tasks, 'getProjectPHIDs')); 111 - $project_handles = $this->loadViewerHandles($all_projects); 112 - $handles += $project_handles; 110 + $all_assigned = mpull($tasks, 'getOwnerPHID'); 111 + 112 + $handles = id(new PhabricatorHandleQuery()) 113 + ->setViewer($user) 114 + ->withPHIDs(array_merge($all_projects, $all_assigned)) 115 + ->execute(); 113 116 114 117 $workbook = new PHPExcel(); 115 118 $format->buildWorkbook($workbook, $tasks, $handles, $user);