1
0

Merge pull request #2479 from DSpace/backport-2366-to-dspace-7_x

[Port dspace-7_x] CSV export fixes
This commit is contained in:
Tim Donohue
2023-09-06 16:08:21 -05:00
committed by GitHub
2 changed files with 15 additions and 1 deletions

View File

@@ -2,5 +2,6 @@
[fixedFilterQuery]="fixedFilter"
[configuration]="configuration"
[searchEnabled]="searchEnabled"
[sideBarWidth]="sideBarWidth">
[sideBarWidth]="sideBarWidth"
[showCsvExport]="true">
</ds-configuration-search-page>

View File

@@ -94,6 +94,19 @@ export class SearchExportCsvComponent implements OnInit {
}
});
}
if (isNotEmpty(this.searchConfig.fixedFilter)) {
const fixedFilter = this.searchConfig.fixedFilter.substring(2);
const keyAndValue = fixedFilter.split('=');
if (keyAndValue.length > 1) {
const key = keyAndValue[0];
const valueAndOperator = keyAndValue[1].split(',');
if (valueAndOperator.length > 1) {
const value = valueAndOperator[0];
const operator = valueAndOperator[1];
parameters.push({name: '-f', value: `${key},${operator}=${value}`});
}
}
}
}
this.scriptDataService.invoke('metadata-export-search', parameters, []).pipe(