Skip to content

CLARIN-DSpace v9/Port #1327 (workflow-item PATCH /license + claim-guard rework) to the v9 base - #1382

Merged
milanmajchrak merged 1 commit into
dtq-dev-9-basefrom
ufal/port-post-snapshot-be4-9-base
Jul 21, 2026
Merged

milanmajchrak merged 1 commit into
dtq-dev-9-basefrom
ufal/port-post-snapshot-be4-9-base

Conversation

@milanmajchrak

Copy link
Copy Markdown
Collaborator

Tranža BE-4 (Vlna 2) — post-snapshot sync dtq-dev → dtq-dev-9-base

Per CLARIN_V9_POST_SNAPSHOT_SYNC_PLAN.md §4 Vlna 2 / BE-4.

8320889f2c (fork PR #1327) — workflow-item PATCH /license + 404/403 claim-guard rework — PORT

Extends PATCH /api/workflow/workflowitems/{id} to accept replace on /license (applies a CLARIN license), and reworks the shared claim guard: missing item → 404 (was NPE), no claims → 422, claimed by another user → 403 (was 422).

v9 adaptations:

  • WorkflowItemRestRepository.java: import conflict resolved keeping jakarta.servlet.http.HttpServletRequest + adding the commit's Jackson imports in v9 order (com < jakarta < org). upload() keeps throws AuthorizeException (v9 base declares it).
  • ClarinWorkflowItemRestRepositoryIT: javax.ws.rs.core.MediaTypejakarta.ws.rs.core.MediaType (7×).
  • TaskRestRepositoriesIT: conflict resolved to jakarta MediaType + the intended 422→403 assertion.
  • Gap fix (sync plan step 5): patchUpdateClarinLicense extended with a bogus-workflowitem-id (999999) isNotFound() assertion covering the new source == null 404 guard the original commit never tested.

Local gates (on 949611004f, after mvn clean install -DskipTests) — ALL GREEN

  • Build + checkstyle: BUILD SUCCESS.
  • AC3 ClarinWorkflowItemRestRepositoryIT: 5/5 (patchUpdateClarinLicense: 403 non-claimer, 404 unknown license, 200 string + wrapped, 400 empty/list/Add, + new bogus-id 404).
  • AC4 TaskRestRepositoriesIT: 72/72 (patch-by-non-claimer now 403; upload-in-review-step still 422).
  • AC5 SupervisionOrderRestRepositoryIT: 30/30 (pooled-item patch still 422 — 422→403 blast radius clean).
  • AC2 isNotFound present; AC6 3× OPERATION_PATH_LICENSE_RESOURCE; AC7 0 javax in the 3 files.
  • AC8–10 (dev-6 REST probes + FE-4 pair) → Wave 2 dev-6 live check.

🤖 Generated with Claude Code

…em, in PATCH operation (ufal#1365) (#1327)

(cherry picked from commit 8320889 on dtq-dev)

v9 adaptations:
- WorkflowItemRestRepository.java: import conflict resolved keeping
  jakarta.servlet.http.HttpServletRequest + adding the commit's Jackson imports in
  v9 import order (com.fasterxml < jakarta < org). upload() keeps 'throws
  AuthorizeException' (legal: v9 DSpaceRestRepository.upload declares it).
- ClarinWorkflowItemRestRepositoryIT: commit's new test code used
  javax.ws.rs.core.MediaType -> converted to jakarta.ws.rs.core.MediaType (7x).
- TaskRestRepositoriesIT: conflict resolved to jakarta MediaType (HEAD) +
  isForbidden() (the commit's intended 422->403 claim-guard semantics change).
- Gap fix per sync plan card step 5: patchUpdateClarinLicense extended with a
  bogus-workflowitem-id (999999) isNotFound() assertion covering the new
  'source == null' 404 guard, which the original commit never tested.

Fulfils CLARIN_V9_POST_SNAPSHOT_SYNC_ACCEPTANCE.md §5 / 8320889 (BE-4, Vlna 2).
@milanmajchrak
milanmajchrak merged commit e2bd53e into dtq-dev-9-base Jul 21, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants