Skip to content

Commit

Permalink
Merge pull request DSpace#2366 from atmire/CSV-export-fixes
Browse files Browse the repository at this point in the history
CSV export fixes
  • Loading branch information
tdonohue authored Sep 6, 2023
2 parents ba70a96 + 45ad5f7 commit f542461
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
[fixedFilterQuery]="fixedFilter"
[configuration]="configuration"
[searchEnabled]="searchEnabled"
[sideBarWidth]="sideBarWidth">
[sideBarWidth]="sideBarWidth"
[showCsvExport]="true">
</ds-configuration-search-page>
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit f542461

Please sign in to comment.