1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-11 07:11:04 +01:00

Fix excel export of builtin queries

Summary: This works fine for custom queries, but not for builtins.

Test Plan: Exported a builtin query.

Reviewers: btrahan

Reviewed By: btrahan

CC: hach-que, aran

Differential Revision: https://secure.phabricator.com/D7015
This commit is contained in:
epriestley 2013-09-17 11:30:48 -07:00
parent a695f264bf
commit bab9a28ab9

View file

@ -60,7 +60,14 @@ final class ManiphestExportController extends ManiphestController {
->withQueryKeys(array($this->key)) ->withQueryKeys(array($this->key))
->executeOne(); ->executeOne();
if (!$saved) { if (!$saved) {
return new Aphront404Response(); $engine = id(new ManiphestTaskSearchEngine())
->setViewer($user);
if ($engine->isBuiltinQuery($this->key)) {
$saved = $engine->buildSavedQueryFromBuiltin($this->key);
}
if (!$saved) {
return new Aphront404Response();
}
} }
$formats = ManiphestExcelFormat::loadAllFormats(); $formats = ManiphestExcelFormat::loadAllFormats();