Skip to content

fix(publishing): add one location scheme parameter from Design - #5325

Merged
natechadwick-intsof merged 3 commits into
mainfrom
fix/issue-5301-location-scheme-add-parameter
Oct 7, 2026
Merged

natechadwick-intsof merged 3 commits into
mainfrom
fix/issue-5301-location-scheme-add-parameter

Conversation

@natechadwick-intsof

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

Copy link
Copy Markdown
Collaborator

Summary

Design can add one parameter (name, type, and value) to an existing location scheme. Confirm writes that single row and leaves the scheme name, generator, description, content type, and template unchanged. The new parameter appears in the scheme list only after a successful save. Cancel does not write. An empty name or empty value does not write. A duplicate parameter name does not add a second row and does not overwrite the stored value. HTTP 400, 403, and 409 leave the previous parameter list in place. Location-scheme rename is unchanged.

PUT /sitemanage/publishingdesign/schemes/{schemeId} with addParameter=true and exactly one parameter under parameters.schemeParameter appends that row. A bare schemeParameter array is not bound by the live resource. SCHEMEPARAMID is assigned from the LOCATION_PROPERTY next number before persist, because the column is not generated. The same assignment runs on create so the first parameter is stored.

Parent: #4531
Fixes #5301

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

Test plan

  1. Open Publishing Design, pick a context, and open Add parameter on a location scheme that already has one parameter.
  2. Confirm shows the existing parameter, leaves name, generator, description, content type, and template read-only, and adds the new name/type/value only after Add parameter.
  3. Cancel with a dirty form and confirm the parameter list is unchanged.
  4. Submit an empty name, then an empty value, and confirm neither writes.
  5. Submit the existing parameter name and confirm no second row and no value overwrite.
  6. With a non-designer session or a forced 403/409, confirm the previous parameter list stays.
  7. Rename the scheme afterward and confirm the rename dialog still saves only the name.

Checklist

  • Product documentation — updated product-docs/8.2/admin/publishing.md (“Add one location scheme parameter (Design)”), including the parameters.schemeParameter wire shape.
  • Unit / module tests — PSPublishingDesignRestServiceTest covers add-one, validation, duplicate 409, 403, and SCHEMEPARAMID assignment; WebUI vitest covers the dialog and the JAXB wrapper body.
  • WebUI + Playwright — modules/perc-qa-automation/frontend/tests/publishing/designLocationSchemeAddParameter.spec.js (happy path plus 400/403/409).
  • Build gates — standalone rtk mvn clean install for projects/sitemanage and WebUI (JDK 21). No final/sealed or public signature change.
  • Cross-platform — no new filesystem path construction.

Build evidence

modules_built: projects/sitemanage, WebUI

cd projects/sitemanage
JAVA_HOME=/usr/lib/jvm/java-21-openjdk rtk mvn clean install
Tests run: 3703, Failures: 0, Errors: 0, Skipped: 125
BUILD SUCCESS (finished 2026-10-07T07:00:17-04:00)
cd WebUI
JAVA_HOME=/usr/lib/jvm/java-21-openjdk rtk mvn clean install
Java tests run: 69, Failures: 0
Vitest: 714 files, 6661 tests passed
BUILD SUCCESS

downstream_checked: no extends PSLocationSchemeSummary and no anonymous new PSLocationSchemeSummary(). updateScheme signature unchanged. PSLocationScheme.addParameter unchanged. system was not rebuilt. WebUI consumes JSON, not the Java type.

UI proof (H2 QA)

python3 docker/scripts/perc-devctl.py qa-up --skip-image-build
python3 docker/scripts/perc-devctl.py qa-health

TEST_CMS_URL=http://127.0.0.1:9993 (freeport from qa-up). Copied sitemanage-8.2.0-SNAPSHOT.jar, rest-8.2.0-SNAPSHOT.jar, and perc-system-8.2.0-SNAPSHOT.jar into the Rhythmyx WAR WEB-INF/lib (the skip-image-build cell was behind main). Redeployed the WebUI bundle with python3 docker/scripts/perc-devctl.py qa-deploy-webui. Restarted Jetty inside perc-matrix-cms-h2 (StopJetty.sh / StartJetty.sh). Post-restart qa-health: RESULT:OK HTTP:200 HEALTH:healthy.

cd modules/perc-qa-automation/frontend
TEST_CMS_URL=http://127.0.0.1:9993 ADMIN_USERNAME=Admin TEST_DB_TYPE=h2 TEST_PRODUCT=cms \
  rtk npm run test:surface -- --path tests/publishing/designLocationSchemeAddParameter.spec.js

2 passed (3.8s). console-clean=yes (spec asserts no page errors). server.log-clean=yes (no ERROR/FATAL/SEVERE lines in the test window after log truncate).

Pre-push local code review

Erlang review — PR #5325

Scope

  • Persona: erlang 0.1.1
  • Persona source: /home/nate/.local/share/mkd/agents/erlang
  • Status: mkd-code-review 0.1.18, pack percussion, --gate advisory, --git-base origin/main
  • PR: fix(publishing): add one location scheme parameter from Design #5325
  • Base: origin/main
  • Head: 28d0fe3
  • Files analyzed: 13
  • In-diff bugs: 0 (preexisting rows do not block)
  • Reviewer: independent Erlang pass. Recommendation: approve.

CLI stdout (mkd-code-review analyze --format markdown)

Summary

Machine analysis found 3 finding(s), 0 bug(s).

Scope

  • Base: origin/main
  • Head: HEAD
  • Files: 13 analyzed
  • In-diff: 3 finding(s); preexisting: 0
  • 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:1354 (in-diff)
  • Rule: complexity.cognitive
  • Tool: arborist-metrics
  • Description: Function updateScheme cognitive=27 (max 15), cyclomatic=23 (max 15)
  • Suggestion: Extract helpers, reduce nesting, use guard clauses (see CODE_STANDARDS).
  • Status: open

Issue 2 -- Severity: suggestion

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

Issue 3 -- Severity: suggestion

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

Interpreter

Independent read of the diff (not the author). Design add-parameter sends addParameter: true and exactly one parameter, and omits name, generator, description, content type, and template. updateScheme validates that one parameter before any setter. Blank name, type, or value, or a name or type longer than 50, is HTTP 400 and does not save. A duplicate parameter name is HTTP 409 and does not save. The append uses IPSLocationScheme.addParameter and assigns a missing SCHEMEPARAMID only on a real PSLocationScheme. Cancel, empty fields, and HTTP 400/403/409 leave the previous list. Companions are present: locationSchemeAddParameter.ts plus Vitest, ContextsPanel, PSPublishingDesignRestServiceTest, Playwright designLocationSchemeAddParameter.spec.js, and product-docs/8.2/admin/publishing.md. No new filesystem path joins. No agent rule files.

wrapLocationScheme now nests parameters as parameters.schemeParameter. The existing Jackson test still shows a bare schemeParameter array binds, and a bare parameters array does not. The H2 Playwright spec creates a scheme with a path parameter through this wrapper and then appends one more parameter on the live cell, so the wrapper shape is what the resource stores. The comment that a bare array is ignored is stronger than that Jackson test; both shapes binding is not a defect.

In-diff machine rows are complexity.cognitive on updateScheme, prepareSchemeParameterAddition, and applySchemeParameters. Severity suggestion, not a bug.

Recommendation: approve. May commit/push: yes.

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

Publishing Design appends one parameter (name, type, value) without
replacing the stored set or changing the scheme name, generator,
description, content type, or template. Confirm writes only after
success. Blank, overlong, and duplicate names do not write.

Fixes #5301

> Co-Authored by Grok Build 1.0.46 using grok-4.7 with agent night-issue-prs.
CXF stores the added row only when the request nests it under
parameters.schemeParameter, and SCHEMEPARAMID must be assigned before
Hibernate persist. Assign the next LOCATION_PROPERTY id on the concrete
scheme and send that wrapper from Design.

Fixes #5301

> 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 7, 2026
Independent pre-merge review. In-diff bugs: 0. Recommendation: approve.

> 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

Independent Erlang review of 28d0fe3d8d (report commit 49e758d49c).

Recommendation: approve. In-diff bugs: 0.

updateScheme validates one parameter before any setter. Blank name, type, or value, or a name or type over 50 characters, is HTTP 400 and does not save. A duplicate parameter name is HTTP 409 and does not save. Name, generator, description, content type, and template stay stored. Cancel does not PUT. Companions: Vitest, PSPublishingDesignRestServiceTest, Playwright designLocationSchemeAddParameter.spec.js, and product-docs/8.2/admin/publishing.md.

Machine rows are complexity suggestions on PSPublishingDesignRestService.java:1354 (updateScheme), :1839 (prepareSchemeParameterAddition), and :1917 (applySchemeParameters). Not bugs.

Full report: docs/ai-generated/code-reviews/pr-5325-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 195022f into main Oct 7, 2026
6 checks passed
@natechadwick-intsof
natechadwick-intsof deleted the fix/issue-5301-location-scheme-add-parameter branch October 7, 2026 11:49
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 90: PublishingShell add one parameter on a location scheme

1 participant