Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SUPReMM data warehouse export regression #1520

Merged
merged 3 commits into from
Mar 30, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion classes/DataWarehouse/Data/BatchDataset.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ private function getNextRow()
$row = [];

foreach ($this->fields as $field) {
$key = $field['name'];
$key = $field['alias'];
$row[] = $field['anonymize']
? $this->anonymizeField($rawRow[$key])
: $rawRow[$key];
Expand Down
6 changes: 6 additions & 0 deletions classes/DataWarehouse/Data/RawStatisticsConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,11 @@ public function getBatchExportFieldDefinitions($realm)
$fields = [];

foreach ($this->getQueryFieldDefinitions($realm) as $field) {
// Skip "ignore" and "analysis" dtype
if (isset($field['dtype']) && in_array($field['dtype'], ['ignore', 'analysis'])) {
continue;
}

$export = isset($field['batchExport']) ? $field['batchExport'] : false;
if ($export === false) {
continue;
Expand All @@ -208,6 +213,7 @@ public function getBatchExportFieldDefinitions($realm)

$fields[] = [
'name' => $field['name'],
'alias' => isset($field['alias']) ? $field['alias'] : $field['name'],
'display' => $display,
'anonymize' => ($export === 'anonymize'),
'documentation' => $field['documentation']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
"name": {
"type": "string"
},
"alias": {
"type": "string"
},
"display": {
"type": "string"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,6 @@ public function testDeleteRequests($role, $httpCode, $schema)
$ids[] = $datum['id'];
}
$data = json_encode($ids);
//$this->assertTrue(false, json_encode($beforeContent['data']));

// Delete all existing requests.
list($content, $info, $headers) = self::$helpers[$role]->delete('rest/warehouse/export/requests', null, $data);
Expand Down