Merge pull request #3095 from tdonohue/port_2761_to_7x

[Port dspace-7_x] Fix caching issues for versioning
This commit is contained in:
Tim Donohue
2024-05-31 11:45:18 -05:00
committed by GitHub
22 changed files with 162 additions and 99 deletions

View File

@@ -5,7 +5,6 @@
* *
* http://www.dspace.org/license/ * http://www.dspace.org/license/
*/ */
import { FindListOptions } from '../find-list-options.model';
import { getMockRequestService } from '../../../shared/mocks/request.service.mock'; import { getMockRequestService } from '../../../shared/mocks/request.service.mock';
import { HALEndpointServiceStub } from '../../../shared/testing/hal-endpoint-service.stub'; import { HALEndpointServiceStub } from '../../../shared/testing/hal-endpoint-service.stub';
import { getMockRemoteDataBuildService } from '../../../shared/mocks/remote-data-build.service.mock'; import { getMockRemoteDataBuildService } from '../../../shared/mocks/remote-data-build.service.mock';
@@ -13,7 +12,7 @@ import { followLink } from '../../../shared/utils/follow-link-config.model';
import { TestScheduler } from 'rxjs/testing'; import { TestScheduler } from 'rxjs/testing';
import { RemoteData } from '../remote-data'; import { RemoteData } from '../remote-data';
import { RequestEntryState } from '../request-entry-state.model'; import { RequestEntryState } from '../request-entry-state.model';
import { Observable, of as observableOf } from 'rxjs'; import { of as observableOf } from 'rxjs';
import { RequestService } from '../request.service'; import { RequestService } from '../request.service';
import { RemoteDataBuildService } from '../../cache/builders/remote-data-build.service'; import { RemoteDataBuildService } from '../../cache/builders/remote-data-build.service';
import { HALEndpointService } from '../../shared/hal-endpoint.service'; import { HALEndpointService } from '../../shared/hal-endpoint.service';
@@ -21,7 +20,8 @@ import { ObjectCacheService } from '../../cache/object-cache.service';
import { IdentifiableDataService } from './identifiable-data.service'; import { IdentifiableDataService } from './identifiable-data.service';
import { EMBED_SEPARATOR } from './base-data.service'; import { EMBED_SEPARATOR } from './base-data.service';
const endpoint = 'https://rest.api/core'; const base = 'https://rest.api/core';
const endpoint = 'test';
class TestService extends IdentifiableDataService<any> { class TestService extends IdentifiableDataService<any> {
constructor( constructor(
@@ -30,11 +30,7 @@ class TestService extends IdentifiableDataService<any> {
protected objectCache: ObjectCacheService, protected objectCache: ObjectCacheService,
protected halService: HALEndpointService, protected halService: HALEndpointService,
) { ) {
super(undefined, requestService, rdbService, objectCache, halService); super(endpoint, requestService, rdbService, objectCache, halService);
}
public getBrowseEndpoint(options: FindListOptions = {}, linkPath: string = this.linkPath): Observable<string> {
return observableOf(endpoint);
} }
} }
@@ -51,7 +47,7 @@ describe('IdentifiableDataService', () => {
function initTestService(): TestService { function initTestService(): TestService {
requestService = getMockRequestService(); requestService = getMockRequestService();
halService = new HALEndpointServiceStub('url') as any; halService = new HALEndpointServiceStub(base) as any;
rdbService = getMockRemoteDataBuildService(); rdbService = getMockRemoteDataBuildService();
objectCache = { objectCache = {
@@ -143,4 +139,12 @@ describe('IdentifiableDataService', () => {
expect(result).toEqual(expected); expect(result).toEqual(expected);
}); });
}); });
describe('invalidateById', () => {
it('should invalidate the correct resource by href', () => {
spyOn(service, 'invalidateByHref').and.returnValue(observableOf(true));
service.invalidateById('123');
expect(service.invalidateByHref).toHaveBeenCalledWith(`${base}/${endpoint}/123`);
});
});
}); });

View File

@@ -8,7 +8,7 @@
import { CacheableObject } from '../../cache/cacheable-object.model'; import { CacheableObject } from '../../cache/cacheable-object.model';
import { FollowLinkConfig } from '../../../shared/utils/follow-link-config.model'; import { FollowLinkConfig } from '../../../shared/utils/follow-link-config.model';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { map } from 'rxjs/operators'; import { map, switchMap, take } from 'rxjs/operators';
import { RemoteData } from '../remote-data'; import { RemoteData } from '../remote-data';
import { BaseDataService } from './base-data.service'; import { BaseDataService } from './base-data.service';
import { RequestService } from '../request.service'; import { RequestService } from '../request.service';
@@ -80,4 +80,19 @@ export class IdentifiableDataService<T extends CacheableObject> extends BaseData
return this.getEndpoint().pipe( return this.getEndpoint().pipe(
map((endpoint: string) => this.getIDHref(endpoint, resourceID, ...linksToFollow))); map((endpoint: string) => this.getIDHref(endpoint, resourceID, ...linksToFollow)));
} }
/**
* Invalidate a cached resource by its identifier
* @param resourceID the identifier of the resource to invalidate
*/
invalidateById(resourceID: string): Observable<boolean> {
const ok$ = this.getIDHrefObs(resourceID).pipe(
take(1),
switchMap((href) => this.invalidateByHref(href))
);
ok$.subscribe();
return ok$;
}
} }

View File

@@ -65,6 +65,10 @@ describe('VersionHistoryDataService', () => {
}, },
}, },
}); });
const version1WithDraft = Object.assign(new Version(), {
...version1,
versionhistory: createSuccessfulRemoteDataObject$(versionHistoryDraft),
});
const versions = [version1, version2]; const versions = [version1, version2];
versionHistory.versions = createSuccessfulRemoteDataObject$(createPaginatedList(versions)); versionHistory.versions = createSuccessfulRemoteDataObject$(createPaginatedList(versions));
const item1 = Object.assign(new Item(), { const item1 = Object.assign(new Item(), {
@@ -186,21 +190,18 @@ describe('VersionHistoryDataService', () => {
}); });
describe('hasDraftVersion$', () => { describe('hasDraftVersion$', () => {
beforeEach(waitForAsync(() => {
versionService.findByHref.and.returnValue(createSuccessfulRemoteDataObject$<Version>(version1));
}));
it('should return false if draftVersion is false', fakeAsync(() => { it('should return false if draftVersion is false', fakeAsync(() => {
versionService.getHistoryFromVersion.and.returnValue(of(versionHistory)); versionService.findByHref.and.returnValue(createSuccessfulRemoteDataObject$<Version>(version1));
service.hasDraftVersion$('href').subscribe((res) => { service.hasDraftVersion$('href').subscribe((res) => {
expect(res).toBeFalse(); expect(res).toBeFalse();
}); });
})); }));
it('should return true if draftVersion is true', fakeAsync(() => { it('should return true if draftVersion is true', fakeAsync(() => {
versionService.getHistoryFromVersion.and.returnValue(of(versionHistoryDraft)); versionService.findByHref.and.returnValue(createSuccessfulRemoteDataObject$<Version>(version1WithDraft));
service.hasDraftVersion$('href').subscribe((res) => { service.hasDraftVersion$('href').subscribe((res) => {
expect(res).toBeTrue(); expect(res).toBeTrue();
}); });
})); }));
}); });
}); });

View File

@@ -6,23 +6,21 @@ import { ObjectCacheService } from '../cache/object-cache.service';
import { HALEndpointService } from '../shared/hal-endpoint.service'; import { HALEndpointService } from '../shared/hal-endpoint.service';
import { HttpHeaders } from '@angular/common/http'; import { HttpHeaders } from '@angular/common/http';
import { PostRequest } from './request.models'; import { PostRequest } from './request.models';
import { Observable, of } from 'rxjs'; import { combineLatest, Observable, of as observableOf } from 'rxjs';
import { PaginatedSearchOptions } from '../../shared/search/models/paginated-search-options.model'; import { PaginatedSearchOptions } from '../../shared/search/models/paginated-search-options.model';
import { RemoteData } from './remote-data'; import { RemoteData } from './remote-data';
import { PaginatedList } from './paginated-list.model'; import { PaginatedList } from './paginated-list.model';
import { Version } from '../shared/version.model'; import { Version } from '../shared/version.model';
import { filter, map, switchMap, take } from 'rxjs/operators'; import { filter, find, map, switchMap, take } from 'rxjs/operators';
import { VERSION_HISTORY } from '../shared/version-history.resource-type'; import { VERSION_HISTORY } from '../shared/version-history.resource-type';
import { followLink, FollowLinkConfig } from '../../shared/utils/follow-link-config.model'; import { followLink, FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
import { VersionDataService } from './version-data.service'; import { VersionDataService } from './version-data.service';
import { HttpOptions } from '../dspace-rest/dspace-rest.service'; import { HttpOptions } from '../dspace-rest/dspace-rest.service';
import { getAllSucceededRemoteData, getFirstCompletedRemoteData, getFirstSucceededRemoteDataPayload, getRemoteDataPayload } from '../shared/operators'; import { getAllSucceededRemoteData, getFirstCompletedRemoteData, getFirstSucceededRemoteDataPayload, getRemoteDataPayload } from '../shared/operators';
import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model'; import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model';
import { hasValueOperator } from '../../shared/empty.util'; import { hasValue, hasValueOperator } from '../../shared/empty.util';
import { Item } from '../shared/item.model'; import { Item } from '../shared/item.model';
import { FindListOptions } from './find-list-options.model'; import { FindListOptions } from './find-list-options.model';
import { sendRequest } from '../shared/request.operators';
import { RestRequest } from './rest-request.model';
import { IdentifiableDataService } from './base/identifiable-data.service'; import { IdentifiableDataService } from './base/identifiable-data.service';
import { dataService } from './base/data-service.decorator'; import { dataService } from './base/data-service.decorator';
@@ -86,19 +84,31 @@ export class VersionHistoryDataService extends IdentifiableDataService<VersionHi
* @param summary the summary of the new version * @param summary the summary of the new version
*/ */
createVersion(itemHref: string, summary: string): Observable<RemoteData<Version>> { createVersion(itemHref: string, summary: string): Observable<RemoteData<Version>> {
const requestId = this.requestService.generateRequestId();
const requestOptions: HttpOptions = Object.create({}); const requestOptions: HttpOptions = Object.create({});
let requestHeaders = new HttpHeaders(); let requestHeaders = new HttpHeaders();
requestHeaders = requestHeaders.append('Content-Type', 'text/uri-list'); requestHeaders = requestHeaders.append('Content-Type', 'text/uri-list');
requestOptions.headers = requestHeaders; requestOptions.headers = requestHeaders;
return this.halService.getEndpoint(this.versionsEndpoint).pipe( this.halService.getEndpoint(this.versionsEndpoint).pipe(
take(1), take(1),
map((endpointUrl: string) => (summary?.length > 0) ? `${endpointUrl}?summary=${summary}` : `${endpointUrl}`), map((endpointUrl: string) => (summary?.length > 0) ? `${endpointUrl}?summary=${summary}` : `${endpointUrl}`),
map((endpointURL: string) => new PostRequest(this.requestService.generateRequestId(), endpointURL, itemHref, requestOptions)), find((href: string) => hasValue(href)),
sendRequest(this.requestService), ).subscribe((href) => {
switchMap((restRequest: RestRequest) => this.rdbService.buildFromRequestUUID(restRequest.uuid)), const request = new PostRequest(requestId, href, itemHref, requestOptions);
getFirstCompletedRemoteData() if (hasValue(this.responseMsToLive)) {
) as Observable<RemoteData<Version>>; request.responseMsToLive = this.responseMsToLive;
}
this.requestService.send(request);
});
return this.rdbService.buildFromRequestUUIDAndAwait<Version>(requestId, (versionRD) => combineLatest([
this.requestService.setStaleByHrefSubstring(versionRD.payload._links.self.href),
this.requestService.setStaleByHrefSubstring(versionRD.payload._links.versionhistory.href),
])).pipe(
getFirstCompletedRemoteData(),
);
} }
/** /**
@@ -137,7 +147,7 @@ export class VersionHistoryDataService extends IdentifiableDataService<VersionHi
switchMap((res) => res.versionhistory), switchMap((res) => res.versionhistory),
getFirstSucceededRemoteDataPayload(), getFirstSucceededRemoteDataPayload(),
switchMap((versionHistoryRD) => this.getLatestVersionFromHistory$(versionHistoryRD)), switchMap((versionHistoryRD) => this.getLatestVersionFromHistory$(versionHistoryRD)),
) : of(null); ) : observableOf(null);
} }
/** /**
@@ -148,8 +158,8 @@ export class VersionHistoryDataService extends IdentifiableDataService<VersionHi
isLatest$(version: Version): Observable<boolean> { isLatest$(version: Version): Observable<boolean> {
return version ? this.getLatestVersion$(version).pipe( return version ? this.getLatestVersion$(version).pipe(
take(1), take(1),
switchMap((latestVersion) => of(version.version === latestVersion.version)) switchMap((latestVersion) => observableOf(version.version === latestVersion.version))
) : of(null); ) : observableOf(null);
} }
/** /**
@@ -158,17 +168,22 @@ export class VersionHistoryDataService extends IdentifiableDataService<VersionHi
* @returns `true` if a workspace item exists, `false` otherwise, or `null` if a version history does not exist * @returns `true` if a workspace item exists, `false` otherwise, or `null` if a version history does not exist
*/ */
hasDraftVersion$(versionHref: string): Observable<boolean> { hasDraftVersion$(versionHref: string): Observable<boolean> {
return this.versionDataService.findByHref(versionHref, true, true, followLink('versionhistory')).pipe( return this.versionDataService.findByHref(versionHref, false, true, followLink('versionhistory')).pipe(
getFirstCompletedRemoteData(), getFirstCompletedRemoteData(),
switchMap((res) => { switchMap((versionRD: RemoteData<Version>) => {
if (res.hasSucceeded && !res.hasNoContent) { if (versionRD.hasSucceeded && !versionRD.hasNoContent) {
return of(res).pipe( return versionRD.payload.versionhistory.pipe(
getFirstSucceededRemoteDataPayload(), getFirstCompletedRemoteData(),
switchMap((version) => this.versionDataService.getHistoryFromVersion(version)), map((versionHistoryRD: RemoteData<VersionHistory>) => {
map((versionHistory) => versionHistory ? versionHistory.draftVersion : false), if (versionHistoryRD.hasSucceeded && !versionHistoryRD.hasNoContent) {
return versionHistoryRD.payload.draftVersion;
} else {
return false;
}
}),
); );
} else { } else {
return of(false); return observableOf(false);
} }
}), }),
); );

View File

@@ -13,7 +13,6 @@ import { RemoteData } from '../data/remote-data';
import { NoContent } from '../shared/NoContent.model'; import { NoContent } from '../shared/NoContent.model';
import { getFirstCompletedRemoteData } from '../shared/operators'; import { getFirstCompletedRemoteData } from '../shared/operators';
import { FollowLinkConfig } from '../../shared/utils/follow-link-config.model'; import { FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
import { WorkspaceItem } from './models/workspaceitem.model';
import { RequestParam } from '../cache/models/request-param.model'; import { RequestParam } from '../cache/models/request-param.model';
import { FindListOptions } from '../data/find-list-options.model'; import { FindListOptions } from '../data/find-list-options.model';
import { IdentifiableDataService } from '../data/base/identifiable-data.service'; import { IdentifiableDataService } from '../data/base/identifiable-data.service';
@@ -28,7 +27,6 @@ import { dataService } from '../data/base/data-service.decorator';
@Injectable() @Injectable()
@dataService(WorkflowItem.type) @dataService(WorkflowItem.type)
export class WorkflowItemDataService extends IdentifiableDataService<WorkflowItem> implements SearchData<WorkflowItem>, DeleteData<WorkflowItem> { export class WorkflowItemDataService extends IdentifiableDataService<WorkflowItem> implements SearchData<WorkflowItem>, DeleteData<WorkflowItem> {
protected linkPath = 'workflowitems';
protected searchByItemLinkPath = 'item'; protected searchByItemLinkPath = 'item';
protected responseMsToLive = 10 * 1000; protected responseMsToLive = 10 * 1000;
@@ -42,7 +40,7 @@ export class WorkflowItemDataService extends IdentifiableDataService<WorkflowIte
protected halService: HALEndpointService, protected halService: HALEndpointService,
protected notificationsService: NotificationsService, protected notificationsService: NotificationsService,
) { ) {
super('workspaceitems', requestService, rdbService, objectCache, halService); super('workflowitems', requestService, rdbService, objectCache, halService);
this.searchData = new SearchDataImpl(this.linkPath, requestService, rdbService, objectCache, halService, this.responseMsToLive); this.searchData = new SearchDataImpl(this.linkPath, requestService, rdbService, objectCache, halService, this.responseMsToLive);
this.deleteData = new DeleteDataImpl(this.linkPath, requestService, rdbService, objectCache, halService, notificationsService, this.responseMsToLive, this.constructIdEndpoint); this.deleteData = new DeleteDataImpl(this.linkPath, requestService, rdbService, objectCache, halService, notificationsService, this.responseMsToLive, this.constructIdEndpoint);
@@ -105,7 +103,7 @@ export class WorkflowItemDataService extends IdentifiableDataService<WorkflowIte
* @param options The {@link FindListOptions} object * @param options The {@link FindListOptions} object
* @param linksToFollow List of {@link FollowLinkConfig} that indicate which {@link HALLink}s should be automatically resolved * @param linksToFollow List of {@link FollowLinkConfig} that indicate which {@link HALLink}s should be automatically resolved
*/ */
public findByItem(uuid: string, useCachedVersionIfAvailable = false, reRequestOnStale = true, options: FindListOptions = {}, ...linksToFollow: FollowLinkConfig<WorkspaceItem>[]): Observable<RemoteData<WorkspaceItem>> { public findByItem(uuid: string, useCachedVersionIfAvailable = false, reRequestOnStale = true, options: FindListOptions = {}, ...linksToFollow: FollowLinkConfig<WorkflowItem>[]): Observable<RemoteData<WorkflowItem>> {
const findListOptions = new FindListOptions(); const findListOptions = new FindListOptions();
findListOptions.searchParams = [new RequestParam('uuid', uuid)]; findListOptions.searchParams = [new RequestParam('uuid', uuid)];
const href$ = this.searchData.getSearchByHref(this.searchByItemLinkPath, findListOptions, ...linksToFollow); const href$ = this.searchData.getSearchByHref(this.searchByItemLinkPath, findListOptions, ...linksToFollow);
@@ -126,7 +124,7 @@ export class WorkflowItemDataService extends IdentifiableDataService<WorkflowIte
* @return {Observable<RemoteData<PaginatedList<T>>} * @return {Observable<RemoteData<PaginatedList<T>>}
* Return an observable that emits response from the server * Return an observable that emits response from the server
*/ */
public searchBy(searchMethod: string, options?: FindListOptions, useCachedVersionIfAvailable?: boolean, reRequestOnStale?: boolean, ...linksToFollow: FollowLinkConfig<WorkspaceItem>[]): Observable<RemoteData<PaginatedList<WorkspaceItem>>> { public searchBy(searchMethod: string, options?: FindListOptions, useCachedVersionIfAvailable?: boolean, reRequestOnStale?: boolean, ...linksToFollow: FollowLinkConfig<WorkflowItem>[]): Observable<RemoteData<PaginatedList<WorkflowItem>>> {
return this.searchData.searchBy(searchMethod, options, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow); return this.searchData.searchBy(searchMethod, options, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow);
} }

View File

@@ -1,7 +1,7 @@
import { getFirstCompletedRemoteData, getFirstSucceededRemoteDataPayload } from '../../../core/shared/operators'; import { getFirstCompletedRemoteData, getFirstSucceededRemoteDataPayload } from '../../../core/shared/operators';
import { RemoteData } from '../../../core/data/remote-data'; import { RemoteData } from '../../../core/data/remote-data';
import { Version } from '../../../core/shared/version.model'; import { Version } from '../../../core/shared/version.model';
import { map, startWith, switchMap, tap } from 'rxjs/operators'; import { map, switchMap, tap } from 'rxjs/operators';
import { Item } from '../../../core/shared/item.model'; import { Item } from '../../../core/shared/item.model';
import { WorkspaceItem } from '../../../core/submission/models/workspaceitem.model'; import { WorkspaceItem } from '../../../core/submission/models/workspaceitem.model';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
@@ -13,9 +13,7 @@ import { ItemDataService } from '../../../core/data/item-data.service';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Observable, of } from 'rxjs'; import { Observable, of } from 'rxjs';
import { ItemVersionsSharedService } from '../../../item-page/versions/item-versions-shared.service'; import { ItemVersionsSharedService } from '../../../item-page/versions/item-versions-shared.service';
import { import { ItemVersionsSummaryModalComponent } from '../../../item-page/versions/item-versions-summary-modal/item-versions-summary-modal.component';
ItemVersionsSummaryModalComponent
} from '../../../item-page/versions/item-versions-summary-modal/item-versions-summary-modal.component';
/** /**
* Service to take care of all the functionality related to the version creation modal * Service to take care of all the functionality related to the version creation modal
@@ -86,7 +84,6 @@ export class DsoVersioningModalService {
// button is disabled if hasDraftVersion = true, and enabled if hasDraftVersion = false or null // button is disabled if hasDraftVersion = true, and enabled if hasDraftVersion = false or null
// (hasDraftVersion is null when a version history does not exist) // (hasDraftVersion is null when a version history does not exist)
map((res) => Boolean(res)), map((res) => Boolean(res)),
startWith(true),
); );
} }

View File

@@ -2,7 +2,7 @@ import { ChangeDetectionStrategy, Injector, NO_ERRORS_SCHEMA } from '@angular/co
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { By } from '@angular/platform-browser'; import { By } from '@angular/platform-browser';
import { TranslateLoader, TranslateModule } from '@ngx-translate/core'; import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
import { of, of as observableOf } from 'rxjs'; import { of as observableOf } from 'rxjs';
import { ClaimedTaskActionsApproveComponent } from './claimed-task-actions-approve.component'; import { ClaimedTaskActionsApproveComponent } from './claimed-task-actions-approve.component';
import { TranslateLoaderMock } from '../../../mocks/translate-loader.mock'; import { TranslateLoaderMock } from '../../../mocks/translate-loader.mock';
@@ -18,6 +18,7 @@ import { Router } from '@angular/router';
import { RouterStub } from '../../../testing/router.stub'; import { RouterStub } from '../../../testing/router.stub';
import { SearchService } from '../../../../core/shared/search/search.service'; import { SearchService } from '../../../../core/shared/search/search.service';
import { RequestService } from '../../../../core/data/request.service'; import { RequestService } from '../../../../core/data/request.service';
import { WorkflowItemDataService } from '../../../../core/submission/workflowitem-data.service';
let component: ClaimedTaskActionsApproveComponent; let component: ClaimedTaskActionsApproveComponent;
let fixture: ComponentFixture<ClaimedTaskActionsApproveComponent>; let fixture: ComponentFixture<ClaimedTaskActionsApproveComponent>;
@@ -27,6 +28,7 @@ const searchService = getMockSearchService();
const requestService = getMockRequestService(); const requestService = getMockRequestService();
let mockPoolTaskDataService: PoolTaskDataService; let mockPoolTaskDataService: PoolTaskDataService;
let mockWorkflowItemDataService: WorkflowItemDataService;
describe('ClaimedTaskActionsApproveComponent', () => { describe('ClaimedTaskActionsApproveComponent', () => {
const object = Object.assign(new ClaimedTask(), { id: 'claimed-task-1' }); const object = Object.assign(new ClaimedTask(), { id: 'claimed-task-1' });
@@ -36,6 +38,10 @@ describe('ClaimedTaskActionsApproveComponent', () => {
beforeEach(waitForAsync(() => { beforeEach(waitForAsync(() => {
mockPoolTaskDataService = new PoolTaskDataService(null, null, null, null); mockPoolTaskDataService = new PoolTaskDataService(null, null, null, null);
mockWorkflowItemDataService = jasmine.createSpyObj('WorkflowItemDataService', {
'invalidateByHref': observableOf(false),
});
TestBed.configureTestingModule({ TestBed.configureTestingModule({
imports: [ imports: [
TranslateModule.forRoot({ TranslateModule.forRoot({
@@ -53,6 +59,7 @@ describe('ClaimedTaskActionsApproveComponent', () => {
{ provide: SearchService, useValue: searchService }, { provide: SearchService, useValue: searchService },
{ provide: RequestService, useValue: requestService }, { provide: RequestService, useValue: requestService },
{ provide: PoolTaskDataService, useValue: mockPoolTaskDataService }, { provide: PoolTaskDataService, useValue: mockPoolTaskDataService },
{ provide: WorkflowItemDataService, useValue: mockWorkflowItemDataService },
], ],
declarations: [ClaimedTaskActionsApproveComponent], declarations: [ClaimedTaskActionsApproveComponent],
schemas: [NO_ERRORS_SCHEMA] schemas: [NO_ERRORS_SCHEMA]
@@ -89,7 +96,7 @@ describe('ClaimedTaskActionsApproveComponent', () => {
beforeEach(() => { beforeEach(() => {
spyOn(component.processCompleted, 'emit'); spyOn(component.processCompleted, 'emit');
spyOn(component, 'startActionExecution').and.returnValue(of(null)); spyOn(component, 'startActionExecution').and.returnValue(observableOf(null));
expectedBody = { expectedBody = {
[component.option]: 'true' [component.option]: 'true'

View File

@@ -10,6 +10,7 @@ import { TranslateService } from '@ngx-translate/core';
import { SearchService } from '../../../../core/shared/search/search.service'; import { SearchService } from '../../../../core/shared/search/search.service';
import { RequestService } from '../../../../core/data/request.service'; import { RequestService } from '../../../../core/data/request.service';
import { ClaimedApprovedTaskSearchResult } from '../../../object-collection/shared/claimed-approved-task-search-result.model'; import { ClaimedApprovedTaskSearchResult } from '../../../object-collection/shared/claimed-approved-task-search-result.model';
import { WorkflowItemDataService } from '../../../../core/submission/workflowitem-data.service';
export const WORKFLOW_TASK_OPTION_APPROVE = 'submit_approve'; export const WORKFLOW_TASK_OPTION_APPROVE = 'submit_approve';
@@ -28,12 +29,15 @@ export class ClaimedTaskActionsApproveComponent extends ClaimedTaskActionsAbstra
*/ */
option = WORKFLOW_TASK_OPTION_APPROVE; option = WORKFLOW_TASK_OPTION_APPROVE;
constructor(protected injector: Injector, constructor(
protected router: Router, protected injector: Injector,
protected notificationsService: NotificationsService, protected router: Router,
protected translate: TranslateService, protected notificationsService: NotificationsService,
protected searchService: SearchService, protected translate: TranslateService,
protected requestService: RequestService) { protected searchService: SearchService,
protected requestService: RequestService,
protected workflowItemDataService: WorkflowItemDataService,
) {
super(injector, router, notificationsService, translate, searchService, requestService); super(injector, router, notificationsService, translate, searchService, requestService);
} }
@@ -48,4 +52,13 @@ export class ClaimedTaskActionsApproveComponent extends ClaimedTaskActionsAbstra
return reloadedObject; return reloadedObject;
} }
public handleReloadableActionResponse(result: boolean, dso: DSpaceObject): void {
super.handleReloadableActionResponse(result, dso);
// Item page version table includes labels for workflow Items, determined
// based on the result of /workflowitems/search/item?uuid=...
// In order for this label to be in sync with the workflow state, we should
// invalidate WFIs as they are approved.
this.workflowItemDataService.invalidateByHref(this.object?._links.workflowitem?.href);
}
} }

View File

@@ -66,6 +66,8 @@ describe('SubmissionObjectEffects test suite', () => {
let submissionServiceStub; let submissionServiceStub;
let submissionJsonPatchOperationsServiceStub; let submissionJsonPatchOperationsServiceStub;
let submissionObjectDataServiceStub; let submissionObjectDataServiceStub;
let workspaceItemDataService;
const collectionId: string = mockSubmissionCollectionId; const collectionId: string = mockSubmissionCollectionId;
const submissionId: string = mockSubmissionId; const submissionId: string = mockSubmissionId;
const submissionDefinitionResponse: any = mockSubmissionDefinitionResponse; const submissionDefinitionResponse: any = mockSubmissionDefinitionResponse;
@@ -82,6 +84,10 @@ describe('SubmissionObjectEffects test suite', () => {
submissionServiceStub.hasUnsavedModification.and.returnValue(observableOf(true)); submissionServiceStub.hasUnsavedModification.and.returnValue(observableOf(true));
workspaceItemDataService = jasmine.createSpyObj('WorkspaceItemDataService', {
invalidateById: observableOf(true),
});
TestBed.configureTestingModule({ TestBed.configureTestingModule({
imports: [ imports: [
StoreModule.forRoot({}, storeModuleConfig), StoreModule.forRoot({}, storeModuleConfig),
@@ -106,6 +112,7 @@ describe('SubmissionObjectEffects test suite', () => {
{ provide: WorkflowItemDataService, useValue: {} }, { provide: WorkflowItemDataService, useValue: {} },
{ provide: HALEndpointService, useValue: {} }, { provide: HALEndpointService, useValue: {} },
{ provide: SubmissionObjectDataService, useValue: submissionObjectDataServiceStub }, { provide: SubmissionObjectDataService, useValue: submissionObjectDataServiceStub },
{ provide: WorkspaceitemDataService, useValue: workspaceItemDataService },
], ],
}); });

View File

@@ -55,6 +55,7 @@ import parseSectionErrorPaths, { SectionErrorPath } from '../utils/parseSectionE
import { FormState } from '../../shared/form/form.reducer'; import { FormState } from '../../shared/form/form.reducer';
import { SubmissionSectionObject } from './submission-section-object.model'; import { SubmissionSectionObject } from './submission-section-object.model';
import { SubmissionSectionError } from './submission-section-error.model'; import { SubmissionSectionError } from './submission-section-error.model';
import { WorkspaceitemDataService } from '../../core/submission/workspaceitem-data.service';
@Injectable() @Injectable()
export class SubmissionObjectEffects { export class SubmissionObjectEffects {
@@ -258,6 +259,7 @@ export class SubmissionObjectEffects {
depositSubmissionSuccess$ = createEffect(() => this.actions$.pipe( depositSubmissionSuccess$ = createEffect(() => this.actions$.pipe(
ofType(SubmissionObjectActionTypes.DEPOSIT_SUBMISSION_SUCCESS), ofType(SubmissionObjectActionTypes.DEPOSIT_SUBMISSION_SUCCESS),
tap(() => this.notificationsService.success(null, this.translate.get('submission.sections.general.deposit_success_notice'))), tap(() => this.notificationsService.success(null, this.translate.get('submission.sections.general.deposit_success_notice'))),
tap((action: DepositSubmissionSuccessAction) => this.workspaceItemDataService.invalidateById(action.payload.submissionId)),
tap(() => this.submissionService.redirectToMyDSpace())), { dispatch: false }); tap(() => this.submissionService.redirectToMyDSpace())), { dispatch: false });
/** /**
@@ -326,14 +328,17 @@ export class SubmissionObjectEffects {
ofType(SubmissionObjectActionTypes.DISCARD_SUBMISSION_ERROR), ofType(SubmissionObjectActionTypes.DISCARD_SUBMISSION_ERROR),
tap(() => this.notificationsService.error(null, this.translate.get('submission.sections.general.discard_error_notice')))), { dispatch: false }); tap(() => this.notificationsService.error(null, this.translate.get('submission.sections.general.discard_error_notice')))), { dispatch: false });
constructor(private actions$: Actions, constructor(
private actions$: Actions,
private notificationsService: NotificationsService, private notificationsService: NotificationsService,
private operationsService: SubmissionJsonPatchOperationsService, private operationsService: SubmissionJsonPatchOperationsService,
private sectionService: SectionsService, private sectionService: SectionsService,
private store$: Store<any>, private store$: Store<any>,
private submissionService: SubmissionService, private submissionService: SubmissionService,
private submissionObjectService: SubmissionObjectDataService, private submissionObjectService: SubmissionObjectDataService,
private translate: TranslateService) { private translate: TranslateService,
private workspaceItemDataService: WorkspaceitemDataService,
) {
} }
/** /**

View File

@@ -3121,7 +3121,7 @@
// "item.page.version.create": "Create new version", // "item.page.version.create": "Create new version",
"item.page.version.create": "নতুন সংস্করণ তৈরি করুন", "item.page.version.create": "নতুন সংস্করণ তৈরি করুন",
// "item.page.version.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", // "item.page.version.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.page.version.hasDraft": "একটি নতুন সংস্করণ তৈরি করা যাচ্ছে না কারণ ভার্সন হিস্ট্রিতে একটি জমা ইনপ্রগ্রেসস অবস্থাই রয়েছে", "item.page.version.hasDraft": "একটি নতুন সংস্করণ তৈরি করা যাচ্ছে না কারণ ভার্সন হিস্ট্রিতে একটি জমা ইনপ্রগ্রেসস অবস্থাই রয়েছে",
// "item.preview.dc.identifier.uri": "Identifier:", // "item.preview.dc.identifier.uri": "Identifier:",
@@ -3250,7 +3250,7 @@
// "item.version.history.table.action.deleteVersion": "Delete version", // "item.version.history.table.action.deleteVersion": "Delete version",
"item.version.history.table.action.deleteVersion": "মুছে ফেলুন সংস্করণ", "item.version.history.table.action.deleteVersion": "মুছে ফেলুন সংস্করণ",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", // "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.history.table.action.hasDraft": "একটি নতুন সংস্করণ তৈরি করা যাচ্ছে না কারণ ভার্সন হিস্ট্রিতে একটি জমা ইনপ্রগ্রেসস অবস্থাই রয়েছে", "item.version.history.table.action.hasDraft": "একটি নতুন সংস্করণ তৈরি করা যাচ্ছে না কারণ ভার্সন হিস্ট্রিতে একটি জমা ইনপ্রগ্রেসস অবস্থাই রয়েছে",
@@ -3291,7 +3291,7 @@
// "item.version.create.notification.failure" : "New version has not been created", // "item.version.create.notification.failure" : "New version has not been created",
"item.version.create.notification.failure": "নতুন সংস্করণ তৈরি করা হয়নি", "item.version.create.notification.failure": "নতুন সংস্করণ তৈরি করা হয়নি",
// "item.version.create.notification.inProgress" : "A new version cannot be created because there is an inprogress submission in the version history", // "item.version.create.notification.inProgress" : "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.create.notification.inProgress": "একটি নতুন সংস্করণ তৈরি করা যাবে না কারণ ভার্সন হিস্ট্রিতে একটি জমা ইনপ্রগ্রেসস অবস্থাই রয়েছে", "item.version.create.notification.inProgress": "একটি নতুন সংস্করণ তৈরি করা যাবে না কারণ ভার্সন হিস্ট্রিতে একটি জমা ইনপ্রগ্রেসস অবস্থাই রয়েছে",

View File

@@ -3376,7 +3376,7 @@
// "item.page.version.create": "Create new version", // "item.page.version.create": "Create new version",
"item.page.version.create": "Crear una nova versió", "item.page.version.create": "Crear una nova versió",
// "item.page.version.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", // "item.page.version.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.page.version.hasDraft": "No es pot crear una nova versió perquè a l'historial de versions hi ha un enviament en curs", "item.page.version.hasDraft": "No es pot crear una nova versió perquè a l'historial de versions hi ha un enviament en curs",
// "item.page.claim.button": "Claim", // "item.page.claim.button": "Claim",
@@ -3535,7 +3535,7 @@
// "item.version.history.table.action.deleteVersion": "Delete version", // "item.version.history.table.action.deleteVersion": "Delete version",
"item.version.history.table.action.deleteVersion": "Esborrar versió", "item.version.history.table.action.deleteVersion": "Esborrar versió",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", // "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.history.table.action.hasDraft": "No és possible crear una nova versió ja que existeix a l'historial de versions un enviament pendent", "item.version.history.table.action.hasDraft": "No és possible crear una nova versió ja que existeix a l'historial de versions un enviament pendent",
@@ -3582,7 +3582,7 @@
// "item.version.create.notification.failure" : "New version has not been created", // "item.version.create.notification.failure" : "New version has not been created",
"item.version.create.notification.failure": "No s'ha creat una nova versió", "item.version.create.notification.failure": "No s'ha creat una nova versió",
// "item.version.create.notification.inProgress" : "A new version cannot be created because there is an inprogress submission in the version history", // "item.version.create.notification.inProgress" : "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.create.notification.inProgress": "No és possible crear una nova versió ja que existeix a l'historial de versions un enviament pendent", "item.version.create.notification.inProgress": "No és possible crear una nova versió ja que existeix a l'historial de versions un enviament pendent",

View File

@@ -2502,7 +2502,7 @@
"item.page.version.create": "Create new version", "item.page.version.create": "Create new version",
"item.page.version.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", "item.page.version.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.page.claim.button": "Claim", "item.page.claim.button": "Claim",
@@ -2614,7 +2614,7 @@
"item.version.history.table.action.deleteVersion": "Delete version", "item.version.history.table.action.deleteVersion": "Delete version",
"item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.notice": "This is not the latest version of this item. The latest version can be found <a href='{{destination}}'>here</a>.", "item.version.notice": "This is not the latest version of this item. The latest version can be found <a href='{{destination}}'>here</a>.",
@@ -2644,7 +2644,7 @@
"item.version.create.notification.failure": "New version has not been created", "item.version.create.notification.failure": "New version has not been created",
"item.version.create.notification.inProgress": "A new version cannot be created because there is an inprogress submission in the version history", "item.version.create.notification.inProgress": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.delete.modal.header": "Delete version", "item.version.delete.modal.header": "Delete version",

View File

@@ -3660,7 +3660,7 @@
// "item.page.version.create": "Create new version", // "item.page.version.create": "Create new version",
"item.page.version.create": "Crear una nueva version", "item.page.version.create": "Crear una nueva version",
// "item.page.version.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", // "item.page.version.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.page.version.hasDraft": "No se puede crear una nueva versión porque en el historial de versiones hay un envío en curso", "item.page.version.hasDraft": "No se puede crear una nueva versión porque en el historial de versiones hay un envío en curso",
// "item.page.claim.button": "Claim", // "item.page.claim.button": "Claim",
@@ -3819,7 +3819,7 @@
// "item.version.history.table.action.deleteVersion": "Delete version", // "item.version.history.table.action.deleteVersion": "Delete version",
"item.version.history.table.action.deleteVersion": "Borrar versión", "item.version.history.table.action.deleteVersion": "Borrar versión",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", // "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.history.table.action.hasDraft": "No es posible crear una nueva versión puesto que existe en el historial de versiones un envío pendiente", "item.version.history.table.action.hasDraft": "No es posible crear una nueva versión puesto que existe en el historial de versiones un envío pendiente",
// "item.version.notice": "This is not the latest version of this item. The latest version can be found <a href='{{destination}}'>here</a>.", // "item.version.notice": "This is not the latest version of this item. The latest version can be found <a href='{{destination}}'>here</a>.",
@@ -3864,7 +3864,7 @@
// "item.version.create.notification.failure": "New version has not been created", // "item.version.create.notification.failure": "New version has not been created",
"item.version.create.notification.failure": "No se ha creado una nueva versión", "item.version.create.notification.failure": "No se ha creado una nueva versión",
// "item.version.create.notification.inProgress": "A new version cannot be created because there is an inprogress submission in the version history", // "item.version.create.notification.inProgress": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.create.notification.inProgress": "No es posible crear una nueva versión puesto que existe en el historial de versiones un envío pendiente", "item.version.create.notification.inProgress": "No es posible crear una nueva versión puesto que existe en el historial de versiones un envío pendiente",
// "item.version.delete.modal.header": "Delete version", // "item.version.delete.modal.header": "Delete version",

View File

@@ -3169,7 +3169,7 @@
// "item.page.version.create": "Create new version", // "item.page.version.create": "Create new version",
"item.page.version.create": "Créer une nouvelle version", "item.page.version.create": "Créer une nouvelle version",
// "item.page.version.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", // "item.page.version.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.page.version.hasDraft": "Une nouvelle version ne peut être créée car il y a une soumission en cours dans l'historique des versions", "item.page.version.hasDraft": "Une nouvelle version ne peut être créée car il y a une soumission en cours dans l'historique des versions",
// "item.preview.dc.identifier.uri": "Identifier:", // "item.preview.dc.identifier.uri": "Identifier:",
@@ -3295,7 +3295,7 @@
// "item.version.history.table.action.deleteVersion": "Delete version", // "item.version.history.table.action.deleteVersion": "Delete version",
"item.version.history.table.action.deleteVersion": "Supprimer la version", "item.version.history.table.action.deleteVersion": "Supprimer la version",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", // "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.history.table.action.hasDraft": "Une nouvelle version ne peut pas être créée parce qu'il y a une soumission en cours dans l'historique des versions.", "item.version.history.table.action.hasDraft": "Une nouvelle version ne peut pas être créée parce qu'il y a une soumission en cours dans l'historique des versions.",
// "item.version.notice": "This is not the latest version of this item. The latest version can be found <a href='{{destination}}'>here</a>.", // "item.version.notice": "This is not the latest version of this item. The latest version can be found <a href='{{destination}}'>here</a>.",
@@ -3334,7 +3334,7 @@
// "item.version.create.notification.failure": "New version has not been created", // "item.version.create.notification.failure": "New version has not been created",
"item.version.create.notification.failure": "La nouvelle version n'a pas été créée", "item.version.create.notification.failure": "La nouvelle version n'a pas été créée",
// "item.version.create.notification.inProgress": "A new version cannot be created because there is an inprogress submission in the version history", // "item.version.create.notification.inProgress": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.create.notification.inProgress": "Une nouvelle version ne peut pas être créée parce qu'il y a une soumission en cours dans l'historique des versions.", "item.version.create.notification.inProgress": "Une nouvelle version ne peut pas être créée parce qu'il y a une soumission en cours dans l'historique des versions.",
// "item.version.delete.modal.header": "Delete version", // "item.version.delete.modal.header": "Delete version",

View File

@@ -3106,7 +3106,7 @@
// "item.page.version.create": "Create new version", // "item.page.version.create": "Create new version",
"item.page.version.create": "Cruthaich dreach ùr", "item.page.version.create": "Cruthaich dreach ùr",
// "item.page.version.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", // "item.page.version.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.page.version.hasDraft": "Cha ghabh dreach ùr a chruthachadh oir tha cur-a-steach a' tachairt ann an eachdraidh nan dreachan", "item.page.version.hasDraft": "Cha ghabh dreach ùr a chruthachadh oir tha cur-a-steach a' tachairt ann an eachdraidh nan dreachan",
// "item.preview.dc.identifier.uri": "Identifier:", // "item.preview.dc.identifier.uri": "Identifier:",
@@ -3235,7 +3235,7 @@
// "item.version.history.table.action.deleteVersion": "Delete version", // "item.version.history.table.action.deleteVersion": "Delete version",
"item.version.history.table.action.deleteVersion": "Dubh às dreach", "item.version.history.table.action.deleteVersion": "Dubh às dreach",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", // "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.history.table.action.hasDraft": "Cha ghabh dreach ùr a chruthachadh oir tha cur-a-steach a' tachairt ann an eachdraidh nan dreachan", "item.version.history.table.action.hasDraft": "Cha ghabh dreach ùr a chruthachadh oir tha cur-a-steach a' tachairt ann an eachdraidh nan dreachan",
@@ -3276,7 +3276,7 @@
// "item.version.create.notification.failure" : "New version has not been created", // "item.version.create.notification.failure" : "New version has not been created",
"item.version.create.notification.failure": "Cha deach dreach ùr a chruthachadh", "item.version.create.notification.failure": "Cha deach dreach ùr a chruthachadh",
// "item.version.create.notification.inProgress" : "A new version cannot be created because there is an inprogress submission in the version history", // "item.version.create.notification.inProgress" : "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.create.notification.inProgress": "Cha ghabh dreach ùr a chruthachadh oir tha cur-a-steach a' tachairt ann an eachdraidh nan dreachan", "item.version.create.notification.inProgress": "Cha ghabh dreach ùr a chruthachadh oir tha cur-a-steach a' tachairt ann an eachdraidh nan dreachan",

View File

@@ -3975,9 +3975,9 @@
// TODO New key - Add a translation // TODO New key - Add a translation
"item.page.version.create": "Create new version", "item.page.version.create": "Create new version",
// "item.page.version.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", // "item.page.version.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
// TODO New key - Add a translation // TODO New key - Add a translation
"item.page.version.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", "item.page.version.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
// "item.page.claim.button": "Claim", // "item.page.claim.button": "Claim",
// TODO New key - Add a translation // TODO New key - Add a translation
@@ -4162,9 +4162,9 @@
// TODO New key - Add a translation // TODO New key - Add a translation
"item.version.history.table.action.deleteVersion": "Delete version", "item.version.history.table.action.deleteVersion": "Delete version",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", // "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
// TODO New key - Add a translation // TODO New key - Add a translation
"item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
// "item.version.notice": "This is not the latest version of this item. The latest version can be found <a href='{{destination}}'>here</a>.", // "item.version.notice": "This is not the latest version of this item. The latest version can be found <a href='{{destination}}'>here</a>.",
@@ -4223,9 +4223,9 @@
// TODO New key - Add a translation // TODO New key - Add a translation
"item.version.create.notification.failure": "New version has not been created", "item.version.create.notification.failure": "New version has not been created",
// "item.version.create.notification.inProgress" : "A new version cannot be created because there is an inprogress submission in the version history", // "item.version.create.notification.inProgress" : "A new version cannot be created because there is an in-progress submission in the version history",
// TODO New key - Add a translation // TODO New key - Add a translation
"item.version.create.notification.inProgress": "A new version cannot be created because there is an inprogress submission in the version history", "item.version.create.notification.inProgress": "A new version cannot be created because there is an in-progress submission in the version history",
// "item.version.delete.modal.header": "Delete version", // "item.version.delete.modal.header": "Delete version",

View File

@@ -3663,7 +3663,7 @@
// "item.page.version.create": "Create new version", // "item.page.version.create": "Create new version",
"item.page.version.create": "Crea una nuova versione", "item.page.version.create": "Crea una nuova versione",
// "item.page.version.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", // "item.page.version.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.page.version.hasDraft": "Impossibile creare una nuova versione perché è presente un'submission in corso nella cronologia delle versioni", "item.page.version.hasDraft": "Impossibile creare una nuova versione perché è presente un'submission in corso nella cronologia delle versioni",
// "item.page.claim.button": "Claim", // "item.page.claim.button": "Claim",
@@ -3822,7 +3822,7 @@
// "item.version.history.table.action.deleteVersion": "Delete version", // "item.version.history.table.action.deleteVersion": "Delete version",
"item.version.history.table.action.deleteVersion": "Elimina versione", "item.version.history.table.action.deleteVersion": "Elimina versione",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", // "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.history.table.action.hasDraft": "Non è possibile creare una nuova versione perchè c'è già una submission in progress nella cronologia delle versioni", "item.version.history.table.action.hasDraft": "Non è possibile creare una nuova versione perchè c'è già una submission in progress nella cronologia delle versioni",
@@ -3869,7 +3869,8 @@
// "item.version.create.notification.failure": "New version has not been created", // "item.version.create.notification.failure": "New version has not been created",
"item.version.create.notification.failure": "Non è stata creata una nuova versione", "item.version.create.notification.failure": "Non è stata creata una nuova versione",
// "item.version.create.notification.inProgress": "A new version cannot be created because there is an inprogress submission in the version history", // "item.version.create.notification.inProgress": "A new version cannot be created because there is an in-progress submission in the version history",
// TODO Source message changed - Revise the translation
"item.version.create.notification.inProgress": "Non è possibile creare una nuova versione perchè c'è già una submission in progress nella cronologia delle versioni", "item.version.create.notification.inProgress": "Non è possibile creare una nuova versione perchè c'è già una submission in progress nella cronologia delle versioni",

View File

@@ -3321,7 +3321,7 @@
// "item.page.version.create": "Create new version", // "item.page.version.create": "Create new version",
"item.page.version.create": "Жаңа нұсқасын жасау", "item.page.version.create": "Жаңа нұсқасын жасау",
// "item.page.version.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", // "item.page.version.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.page.version.hasDraft": "Жаңа нұсқаны жасау мүмкін емес, өйткені нұсқа тарихында аяқталмаған жіберу бар", "item.page.version.hasDraft": "Жаңа нұсқаны жасау мүмкін емес, өйткені нұсқа тарихында аяқталмаған жіберу бар",
// "item.page.claim.button": "Claim", // "item.page.claim.button": "Claim",
@@ -3481,7 +3481,7 @@
// "item.version.history.table.action.deleteVersion": "Delete version", // "item.version.history.table.action.deleteVersion": "Delete version",
"item.version.history.table.action.deleteVersion": "Нұсқаны өшіру", "item.version.history.table.action.deleteVersion": "Нұсқаны өшіру",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", // "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.history.table.action.hasDraft": "Жаңа нұсқаны жасау мүмкін емес, өйткені нұсқа тарихында аяқталмаған бағынымдар бар", "item.version.history.table.action.hasDraft": "Жаңа нұсқаны жасау мүмкін емес, өйткені нұсқа тарихында аяқталмаған бағынымдар бар",
@@ -3528,7 +3528,7 @@
// "item.version.create.notification.failure" : "New version has not been created", // "item.version.create.notification.failure" : "New version has not been created",
"item.version.create.notification.failure": "Жаңа нұсқа жасалмады", "item.version.create.notification.failure": "Жаңа нұсқа жасалмады",
// "item.version.create.notification.inProgress" : "A new version cannot be created because there is an inprogress submission in the version history", // "item.version.create.notification.inProgress" : "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.create.notification.inProgress": "Жаңа нұсқаны жасау мүмкін емес, өйткені нұсқа тарихында аяқталмаған жіберу бар", "item.version.create.notification.inProgress": "Жаңа нұсқаны жасау мүмкін емес, өйткені нұсқа тарихында аяқталмаған жіберу бар",

View File

@@ -3669,7 +3669,7 @@
// "item.page.version.create": "Create new version", // "item.page.version.create": "Create new version",
"item.page.version.create": "Criar nova versão", "item.page.version.create": "Criar nova versão",
// "item.page.version.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", // "item.page.version.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.page.version.hasDraft": "Não é possível criar uma nova versão porque há uma submissão em andamento no histórico de versões", "item.page.version.hasDraft": "Não é possível criar uma nova versão porque há uma submissão em andamento no histórico de versões",
// "item.page.claim.button": "Claim", // "item.page.claim.button": "Claim",
@@ -3828,7 +3828,7 @@
// "item.version.history.table.action.deleteVersion": "Delete version", // "item.version.history.table.action.deleteVersion": "Delete version",
"item.version.history.table.action.deleteVersion": "Apagar versão", "item.version.history.table.action.deleteVersion": "Apagar versão",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", // "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.history.table.action.hasDraft": "Não é possível criar uma nova versão porque há uma submissão em andamento no histórico de versões", "item.version.history.table.action.hasDraft": "Não é possível criar uma nova versão porque há uma submissão em andamento no histórico de versões",
// "item.version.notice": "This is not the latest version of this item. The latest version can be found <a href='{{destination}}'>here</a>.", // "item.version.notice": "This is not the latest version of this item. The latest version can be found <a href='{{destination}}'>here</a>.",
@@ -3873,7 +3873,7 @@
// "item.version.create.notification.failure": "New version has not been created", // "item.version.create.notification.failure": "New version has not been created",
"item.version.create.notification.failure": "A nova versão não foi criada", "item.version.create.notification.failure": "A nova versão não foi criada",
// "item.version.create.notification.inProgress": "A new version cannot be created because there is an inprogress submission in the version history", // "item.version.create.notification.inProgress": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.create.notification.inProgress": "Não é possível criar uma nova versão porque há uma submissão em andamento no histórico de versões", "item.version.create.notification.inProgress": "Não é possível criar uma nova versão porque há uma submissão em andamento no histórico de versões",
// "item.version.delete.modal.header": "Delete version", // "item.version.delete.modal.header": "Delete version",

View File

@@ -3706,7 +3706,7 @@
// "item.page.version.create": "Create new version", // "item.page.version.create": "Create new version",
"item.page.version.create": "Criar nova versão", "item.page.version.create": "Criar nova versão",
// "item.page.version.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", // "item.page.version.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.page.version.hasDraft": "Um nova versão não pode ser criada porque já se encontra uma submisão em curso no histórico de versões.", "item.page.version.hasDraft": "Um nova versão não pode ser criada porque já se encontra uma submisão em curso no histórico de versões.",
// "item.page.claim.button": "Claim", // "item.page.claim.button": "Claim",
@@ -3871,7 +3871,7 @@
// "item.version.history.table.action.deleteVersion": "Delete version", // "item.version.history.table.action.deleteVersion": "Delete version",
"item.version.history.table.action.deleteVersion": "Remover versão", "item.version.history.table.action.deleteVersion": "Remover versão",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", // "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.history.table.action.hasDraft": "Uma nova versão não pode ser criada porque se encontra um depósito em curso no histórico de versões", "item.version.history.table.action.hasDraft": "Uma nova versão não pode ser criada porque se encontra um depósito em curso no histórico de versões",
// "item.version.notice": "This is not the latest version of this item. The latest version can be found <a href='{{destination}}'>here</a>.", // "item.version.notice": "This is not the latest version of this item. The latest version can be found <a href='{{destination}}'>here</a>.",
@@ -3916,7 +3916,7 @@
// "item.version.create.notification.failure": "New version has not been created", // "item.version.create.notification.failure": "New version has not been created",
"item.version.create.notification.failure": "Nova versão não foi criada", "item.version.create.notification.failure": "Nova versão não foi criada",
// "item.version.create.notification.inProgress": "A new version cannot be created because there is an inprogress submission in the version history", // "item.version.create.notification.inProgress": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.create.notification.inProgress": "Uma nova versão não pode ser criada porque se encontra um depósito em curso no histórico de versões", "item.version.create.notification.inProgress": "Uma nova versão não pode ser criada porque se encontra um depósito em curso no histórico de versões",
// "item.version.delete.modal.header": "Delete version", // "item.version.delete.modal.header": "Delete version",

View File

@@ -3151,7 +3151,7 @@
// "item.page.version.create": "Create new version", // "item.page.version.create": "Create new version",
"item.page.version.create": "Skapa ny version", "item.page.version.create": "Skapa ny version",
// "item.page.version.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", // "item.page.version.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.page.version.hasDraft": "Ny version kan inte skapas pga pågående uppladdning i versionshistoriken", "item.page.version.hasDraft": "Ny version kan inte skapas pga pågående uppladdning i versionshistoriken",
// "item.preview.dc.identifier.uri": "Identifier:", // "item.preview.dc.identifier.uri": "Identifier:",
@@ -3281,9 +3281,9 @@
// "item.version.history.table.action.deleteVersion": "Delete version", // "item.version.history.table.action.deleteVersion": "Delete version",
"item.version.history.table.action.deleteVersion": "Radera version", "item.version.history.table.action.deleteVersion": "Radera version",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", // "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
// TODO New key - Add a translation // TODO New key - Add a translation
"item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
// "item.version.notice": "This is not the latest version of this item. The latest version can be found <a href='{{destination}}'>here</a>.", // "item.version.notice": "This is not the latest version of this item. The latest version can be found <a href='{{destination}}'>here</a>.",
@@ -3323,9 +3323,9 @@
// "item.version.create.notification.failure" : "New version has not been created", // "item.version.create.notification.failure" : "New version has not been created",
"item.version.create.notification.failure": "Ny version har inte skapats", "item.version.create.notification.failure": "Ny version har inte skapats",
// "item.version.create.notification.inProgress" : "A new version cannot be created because there is an inprogress submission in the version history", // "item.version.create.notification.inProgress" : "A new version cannot be created because there is an in-progress submission in the version history",
// TODO New key - Add a translation // TODO New key - Add a translation
"item.version.create.notification.inProgress": "A new version cannot be created because there is an inprogress submission in the version history", "item.version.create.notification.inProgress": "A new version cannot be created because there is an in-progress submission in the version history",
// "item.version.delete.modal.header": "Delete version", // "item.version.delete.modal.header": "Delete version",