Skip to content

fix(publishing): reorder a content list on an edition - #5195

Merged
natechadwick-intsof merged 2 commits into
mainfrom
fix/issue-5184-edition-content-list-order
Oct 5, 2026
Merged

natechadwick-intsof merged 2 commits into
mainfrom
fix/issue-5184-edition-content-list-order

Conversation

@natechadwick-intsof

@natechadwick-intsof natechadwick-intsof commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Publishing Design can move one content list up or down on an edition. The move is an adjacent PUT of PSEditionContentList.sequence. The rendered order changes only after that write succeeds. Cancel does not call the server. HTTP 400, 403, and 409 keep the previous order. Associating a list with no sequence appends it after the highest numbered association so a new pair stays in click order.

Parent tracker: #4531 (slice 75). Fixes #5184.

Operator: Grok: night-issue-prs (model grok-4.7)

Test plan

  1. Open Publish → Design → Editions, open an edition with two or more associated content lists.
  2. Confirm Move up is disabled on the first row and Move down is disabled on the last row.
  3. Move a middle row down, accept the confirm dialog, and confirm the names swap only after the request returns. Reopen the edition and confirm the order stayed.
  4. Start a move and cancel the dialog. Confirm the order does not change and no sequence request is sent.
  5. With a running publish job (or a forced 409), confirm the editor shows Edition is in use and the order stays. Repeat for 400 (not adjacent) and 403 (not Admin or Designer).

Checklist

  • Product documentation — updated product-docs/8.2/admin/publishing.md (Reorder a content list on an edition; associate stores the next sequence). Frontmatter id unchanged.
  • Unit / module tests — PSPublishingDesignRestServiceTest reorder/associate-sequence cases; Vitest EditionEditor.reorder.test.tsx and reorderEditionContentList.api.test.ts.
  • WebUI + Playwright — modules/perc-qa-automation/frontend/tests/publishing/designEditionReorderContentList.spec.js (3 passed on H2).
  • Build gates — standalone clean install for projects/sitemanage, WebUI, and modules/perc-qa-automation (no skipTests).
  • Cross-platform — no new filesystem path construction. Request paths are URL paths.

Build evidence

modules_built: projects/sitemanage, WebUI, modules/perc-qa-automation

downstream_checked: none (C2 did not apply). No type was made final or sealed, and no existing public or protected signature changed. The new PUT is a sitemanage publishingdesign method. Production code does not subclass PSPublishingDesignRestService.

Commands (JAVA_HOME=/usr/lib/jvm/java-21-openjdk):

  • cd projects/sitemanage && bash ../../mvnw clean install — BUILD SUCCESS. Tests run: 3512, Failures: 0, Errors: 0, Skipped: 125.
  • cd WebUI && bash ../mvnw clean install — BUILD SUCCESS. Java tests run: 69, Failures: 0. Vitest: Test Files 669 passed, Tests 6104 passed.
  • cd modules/perc-qa-automation && bash ../../mvnw clean install — BUILD SUCCESS. Surefire: No tests to run (Playwright is the surface spec below, not the default Maven test phase).

UI proof (H2 QA)

  • python3 docker/scripts/perc-devctl.py qa-up --skip-image-build — RESULT:OK. TEST_CMS_URL=http://127.0.0.1:9993 (freeport from that run). QA_CONTAINER=perc-matrix-cms-h2.
  • python3 docker/scripts/perc-devctl.py qa-health — RESULT:OK HTTP:200 HEALTH:healthy.
  • python3 docker/scripts/perc-devctl.py qa-deploy-war-jars --restart-jetty — copied this worktree's perc-system, rest, sitemanage, and extensions-workflow jars into the Rhythmyx WAR WEB-INF/lib and restarted Jetty in-cell. RESULT:OK.
  • python3 docker/scripts/perc-devctl.py qa-health — RESULT:OK HTTP:200 HEALTH:healthy.
  • python3 docker/scripts/perc-devctl.py qa-deploy-webui — RESULT:OK.
  • python3 docker/scripts/perc-devctl.py qa-health — RESULT:OK HTTP:200 HEALTH:healthy.
  • cd modules/perc-qa-automation/frontend && npm run test:surface -- --path tests/publishing/designEditionReorderContentList.spec.js with TEST_CMS_URL, ADMIN_USERNAME=Admin, TEST_DB_TYPE=h2, TEST_PRODUCT=cms — 3 passed (6.3s).
  • console-clean=yes (spec fails on pageerror / console error).
  • server.log-clean=yes (no new ERROR/FATAL/SEVERE in /opt/Percussion/jetty/base/logs/server.log during the Playwright window).

Pre-push local code review

## Summary

Machine analysis found **1** finding(s), **0** bug(s).

## Scope

- Base: origin/main
- Head: HEAD
- Files: 11 analyzed
- In-diff: 0 finding(s); preexisting: 1
- Persona: erlang 0.1.1
- Persona source: /home/nate/.local/share/mkd/agents/erlang

## Recommendation

approve

## Gate

- Blocking bugs: 0
- May commit/push: yes

## Issues

### Issue 1 -- Severity: suggestion

- File: projects/sitemanage/src/main/java/com/percussion/publishingdesign/impl/PSPublishingDesignRestService.java:817 (preexisting)
- Rule: `complexity.cognitive`
- Tool: `arborist-metrics`
- Description: Function `associateContentList` cognitive=16 (max 15), cyclomatic=15 (max 15)
- Suggestion: Extract helpers, reduce nesting, use guard clauses (see CODE_STANDARDS).
- Status: open

Erlang verdict

Independent read of reorderEditionContentList, EditionEditor.handleReorder, and reorderEditionContentList in designApi.

Non-adjacent positions, a missing sequence, and a blank id are HTTP 400 before any save. Design-write denial is 403. A running publish job is 409. An adjacent move rewrites stored sequences to 1..n. The editor swaps that pair only after the PUT returns; cancel does not write. Edition priority is not part of this request. The associateContentList complexity row is preexisting and out of diff, so it does not block. The two saveEditionContentList calls are separate transactions; a failure on the second row could leave a partial order while the UI shows the error. That is not the specified happy path or the 400/403/409 paths, and it is not a missing behavioral test. No agent rule files are in the diff.

Recommendation: approve. May merge: yes.

Co-Authored by Grok Build 1.0.46 using grok-4.7 with agent night-issue-prs.

Co-Authored by Grok Build 1.0.46 using grok-4.7 with agent night-issue-prs-erlang.

Move up and move down change one edition content-list association only after an adjacent sequence write succeeds. First and last rows stay disabled, cancel does not write, and HTTP 400, 403, and 409 keep the previous order.

Fixes #5184

> Co-Authored by Grok Build 1.0.46 using grok-4.7 with agent night-issue-prs.
@natechadwick-intsof natechadwick-intsof added operator:grok Changes authored by Grok operator:night-issue-prs night-issue-prs workflow model:grok-4.7 Session model grok-4.7 labels Oct 5, 2026
> Co-Authored by Grok Build 1.0.46 using grok-4.7 with agent night-issue-prs-erlang.
@natechadwick-intsof

Copy link
Copy Markdown
Collaborator Author

LGTM. Same-login APPROVE is rejected, so this comment is the review.

Independent Erlang pass (mkd-code-review 0.1.18, percussion, advisory, --git-base origin/main, persona erlang 0.1.1). Head at review was 3dc4785362; the report commit is docs-only. Machine gate: 0 in-diff bugs. The only complexity row is preexisting associateContentList, out of diff. I read reorderEditionContentList and the editor. Non-adjacent moves, 403, and a running job fail before save. The row swaps only after the PUT. Edition priority is untouched. No missing behavioral tests, non-portable paths, or rule diffs.

Full CLI report: PR body section ## Pre-push local code review and docs/ai-generated/code-reviews/pr-5195-erlang.md.

Co-Authored by Grok Build 1.0.46 using grok-4.7 with agent night-issue-prs-erlang.

@natechadwick-intsof
natechadwick-intsof merged commit 96b6ec8 into main Oct 5, 2026
6 checks passed
@natechadwick-intsof
natechadwick-intsof deleted the fix/issue-5184-edition-content-list-order branch October 5, 2026 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

model:grok-4.7 Session model grok-4.7 operator:grok Changes authored by Grok operator:night-issue-prs night-issue-prs workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

issue 4531 slice 75: Publishing reorder a content list on an edition

1 participant