Skip to content

Commit 5b1e0d3

Browse files
committed
CST-6685 updated changes
1 parent b022a93 commit 5b1e0d3

5 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/app/admin/admin-import-batch-page/batch-import-page.component.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ describe('BatchImportPageComponent', () => {
101101
const parameterValues: ProcessParameter[] = [
102102
Object.assign(new ProcessParameter(), { name: '--zip', value: 'filename.zip' }),
103103
];
104+
parameterValues.push(Object.assign(new ProcessParameter(), { name: '--add', value: 'filename.zip' }));
104105
expect(scriptService.invoke).toHaveBeenCalledWith(BATCH_IMPORT_SCRIPT_NAME, parameterValues, [fileMock]);
105106
});
106107
it('success notification is shown', () => {
@@ -121,6 +122,7 @@ describe('BatchImportPageComponent', () => {
121122
it('metadata-import script is invoked with --zip fileName and the mockFile and -v validate-only', () => {
122123
const parameterValues: ProcessParameter[] = [
123124
Object.assign(new ProcessParameter(), { name: '--zip', value: 'filename.zip' }),
125+
Object.assign(new ProcessParameter(), { name: '--add', value: 'filename.zip' }),
124126
Object.assign(new ProcessParameter(), { name: '-v', value: true }),
125127
];
126128
expect(scriptService.invoke).toHaveBeenCalledWith(BATCH_IMPORT_SCRIPT_NAME, parameterValues, [fileMock]);

src/app/admin/admin-import-batch-page/batch-import-page.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export class BatchImportPageComponent {
7878
const parameterValues: ProcessParameter[] = [
7979
Object.assign(new ProcessParameter(), { name: '--zip', value: this.fileObject.name }),
8080
];
81+
parameterValues.push(Object.assign(new ProcessParameter(), { name: '--add', value: this.fileObject.name }));
8182
if (this.dso) {
8283
parameterValues.push(Object.assign(new ProcessParameter(), { name: '--collection', value: this.dso.uuid }));
8384
}

src/app/core/data/processes/script-data.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { dataService } from '../base/data-service.decorator';
2424

2525
export const METADATA_IMPORT_SCRIPT_NAME = 'metadata-import';
2626
export const METADATA_EXPORT_SCRIPT_NAME = 'metadata-export';
27-
export const BATCH_IMPORT_SCRIPT_NAME = 'batch-import';
27+
export const BATCH_IMPORT_SCRIPT_NAME = 'import';
2828

2929
@Injectable()
3030
@dataService(SCRIPT)

src/app/shared/dso-selector/modal-wrappers/import-batch-selector/import-batch-selector.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { Observable, of } from 'rxjs';
1818
})
1919
export class ImportBatchSelectorComponent extends DSOSelectorModalWrapperComponent implements OnInit {
2020
objectType = DSpaceObjectType.DSPACEOBJECT;
21-
selectorTypes = [DSpaceObjectType.COLLECTION, DSpaceObjectType.COMMUNITY];
21+
selectorTypes = [DSpaceObjectType.COLLECTION];
2222
action = SelectorActionType.IMPORT_BATCH;
2323
/**
2424
* An event fired when the modal is closed

src/assets/i18n/en.json5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@
554554

555555
"admin.metadata-import.page.help": "You can drop or browse CSV files that contain batch metadata operations on files here",
556556

557-
"admin.batch-import.page.help": "You can drop or browse ZIP files that contain batch operations on files here",
557+
"admin.batch-import.page.help": "Select the Collection to import into. Then, drop or browse to a Simple Archive Format (SAF) zip file that includes the Items to import",
558558

559559
"admin.metadata-import.page.dropMsg": "Drop a metadata CSV to import",
560560

0 commit comments

Comments
 (0)