CLARIN-DSpace v9/Port #1301 (route-aware CLARIN license PATCH in workflow-item edit) to the v9 base - #1396
Open
milanmajchrak wants to merge 1 commit into
Open
Conversation
…ssion PATCH (#1301) ADAPT port of dtq-dev commit 50a0e30 onto dtq-dev-9-base. Problem: the CLARIN license submission section always resolved the in-progress item via WorkspaceitemDataService.findById and PATCHed the hardcoded /api/submission/workspaceitems/<id> endpoint, so a reviewer editing a WORKFLOW item could not load the accepted license nor save a new one. Fix: replace WorkspaceitemDataService + HALEndpointService with the route-aware SubmissionService.retrieveSubmission (getActualWorkspaceItem -> getActualSubmissionItem returning SubmissionObject), send the sections/clarin-license/select PATCH to the submission object's own _links.self.href (which is /api/workflow/workflowitems/<id> for workflow items), and add hasSucceeded/null guards on both RemoteData resolutions. v9 adaptations: - File lives at submission/sections/clarin-license-resource/ on v9 (not clarin-license/). - Removed now-unused imports (WorkspaceItem, WorkspaceitemDataService, HALEndpointService, rxjs find); added SubmissionService + SubmissionObject in eslint-sorted positions. .toPromise() kept (compiles on v9-base; diff-minimal). - Spec: v9-base had dropped this spec entirely; rewritten from the dtq-dev spec into v9 standalone TestBed style (imports[] not declarations, standalone TestComponent). Karma: 2/2 green incl. the assertion that sendRequest PATCHes the submission self link (route-aware, works for workflow items). Not pulled in: BE twin 8320889f2c (#1327) — separate BE-4 tranža. Happy path (claimed task) already works on today's v9-base BE via OPERATION_PATH_SECTIONS -> ClarinLicenseResourceStep; full 403/404 error-semantics parity is the BE-4 pass. Fulfils CLARIN_V9_POST_SNAPSHOT_SYNC_ACCEPTANCE.md §5 / 50a0e30 (FE-4, Vlna 3).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tranža FE-4 (Vlna 3) — post-snapshot sync dtq-dev → dtq-dev-9-base
Per CLARIN_V9_POST_SNAPSHOT_SYNC_PLAN.md §4 Vlna 3 / FE-4.
50a0e3081e(fork PR #1301) — lost CLARIN license in workflow-item edit — ADAPTThe CLARIN license submission section always resolved the item via
WorkspaceitemDataService.findByIdand PATCHed the hardcoded/api/submission/workspaceitems/<id>, so a reviewer editing a workflow item couldn't load the accepted license or save a new one. Fix routes throughSubmissionService.retrieveSubmissionand PATCHes the submission object's own_links.self.href(/api/workflow/workflowitems/<id>for workflow items), withhasSucceeded/null guards.v9 adaptations:
submission/sections/clarin-license-**resource**/on v9 (plan card saidclarin-license/— corrected).WorkspaceItem,WorkspaceitemDataService,HALEndpointService, rxjsfind); addedSubmissionService+SubmissionObjectin eslint-sorted positions..toPromise()kept (diff-minimal).Local gates (on
55ec542b2e) — ALL GREENsendRequestPATCHes the submission self link (route-aware, works for workflow items).npm run lint:nobuild: 0 errors.npm run build:prod: exit 0.8320889f2c(TUL/Make Solr heap tunable via SOLR_HEAP (backport #1309) #1327, separate BE-4 PR UFAL/Author name (clarin-name widget) stored without space after comma #1382). Happy path (claimed task) already works on today's v9-base BE viaOPERATION_PATH_SECTIONS→ClarinLicenseResourceStep.🤖 Generated with Claude Code