Give data exporters a header row
Summary: Depends on D18951. Ref T13049. When we export to CSV or plain text, add a header row in the first line of the file to explain what each column means. This often isn't obvious with PHIDs, etc. JSON has keys and is essentially self-labeling, so don't do anything special. Test Plan: Exported CSV and text, saw new headers. Exported JSON, no changes. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13049 Differential Revision: https://secure.phabricator.com/D18952
This commit is contained in:
@@ -454,6 +454,7 @@ final class PhabricatorApplicationSearchController
|
||||
$field_list = $engine->newExportFieldList();
|
||||
$field_list = mpull($field_list, null, 'getKey');
|
||||
|
||||
$format->addHeaders($field_list);
|
||||
for ($ii = 0; $ii < count($objects); $ii++) {
|
||||
$format->addObject($objects[$ii], $field_list, $export_data[$ii]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user