diff --git a/src/app/curation-form/curation-form.component.spec.ts b/src/app/curation-form/curation-form.component.spec.ts index 76aaa7fbf1..93bad4fef2 100644 --- a/src/app/curation-form/curation-form.component.spec.ts +++ b/src/app/curation-form/curation-form.component.spec.ts @@ -57,8 +57,10 @@ describe('CurationFormComponent', () => { name: 'plugin.named.org.dspace.curate.CurationTask', values: [ 'org.dspace.ctask.general.ProfileFormats = profileformats', + '', 'org.dspace.ctask.general.RequiredMetadata = requiredmetadata', - 'org.dspace.ctask.general.MetadataValueLinkChecker = checklinks' + 'org.dspace.ctask.general.MetadataValueLinkChecker = checklinks', + 'value-to-be-skipped' ] })) }); diff --git a/src/app/curation-form/curation-form.component.ts b/src/app/curation-form/curation-form.component.ts index e69e08f8a9..95512d1129 100644 --- a/src/app/curation-form/curation-form.component.ts +++ b/src/app/curation-form/curation-form.component.ts @@ -8,7 +8,7 @@ import { filter, map, switchMap, take } from 'rxjs/operators'; import { EPerson } from '../core/eperson/models/eperson.model'; import { NotificationsService } from '../shared/notifications/notifications.service'; import { TranslateService } from '@ngx-translate/core'; -import { hasValue, isEmpty } from '../shared/empty.util'; +import { hasValue, isEmpty, isNotEmpty } from '../shared/empty.util'; import { RemoteData } from '../core/data/remote-data'; import { Router } from '@angular/router'; import { ProcessDataService } from '../core/data/processes/process-data.service'; @@ -58,7 +58,9 @@ export class CurationFormComponent implements OnInit { find((rd: RemoteData) => rd.hasSucceeded), map((rd: RemoteData) => rd.payload) ).subscribe((configProperties) => { - this.tasks = configProperties.values.map((value) => value.split('=')[1].trim()); + this.tasks = configProperties.values + .filter((value) => isNotEmpty(value) && value.includes('=')) + .map((value) => value.split('=')[1].trim()); this.form.get('task').patchValue(this.tasks[0]); }); }