Repository navigation
fix(publishing): add one location scheme parameter from Design - #5325
Conversation
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.
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.
|
Independent Erlang review of Recommendation: approve. In-diff bugs: 0.
Machine rows are complexity suggestions on Full report:
|
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}withaddParameter=trueand exactly one parameter underparameters.schemeParameterappends that row. A bareschemeParameterarray is not bound by the live resource.SCHEMEPARAMIDis assigned from theLOCATION_PROPERTYnext 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
Checklist
product-docs/8.2/admin/publishing.md(“Add one location scheme parameter (Design)”), including theparameters.schemeParameterwire shape.PSPublishingDesignRestServiceTestcovers add-one, validation, duplicate 409, 403, andSCHEMEPARAMIDassignment; WebUI vitest covers the dialog and the JAXB wrapper body.modules/perc-qa-automation/frontend/tests/publishing/designLocationSchemeAddParameter.spec.js(happy path plus 400/403/409).rtk mvn clean installforprojects/sitemanageandWebUI(JDK 21). Nofinal/sealedor public signature change.Build evidence
modules_built: projects/sitemanage, WebUI
downstream_checked: no
extends PSLocationSchemeSummaryand no anonymousnew PSLocationSchemeSummary().updateSchemesignature unchanged.PSLocationScheme.addParameterunchanged.systemwas not rebuilt. WebUI consumes JSON, not the Java type.UI proof (H2 QA)
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, andperc-system-8.2.0-SNAPSHOT.jarinto the Rhythmyx WARWEB-INF/lib(the skip-image-build cell was behind main). Redeployed the WebUI bundle withpython3 docker/scripts/perc-devctl.py qa-deploy-webui. Restarted Jetty insideperc-matrix-cms-h2(StopJetty.sh / StartJetty.sh). Post-restartqa-health: RESULT:OK HTTP:200 HEALTH:healthy.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
CLI stdout (
mkd-code-review analyze --format markdown)Summary
Machine analysis found 3 finding(s), 0 bug(s).
Scope
Recommendation
approve
Gate
Issues
Issue 1 -- Severity: suggestion
complexity.cognitivearborist-metricsupdateSchemecognitive=27 (max 15), cyclomatic=23 (max 15)Issue 2 -- Severity: suggestion
complexity.cognitivearborist-metricsprepareSchemeParameterAdditioncognitive=17 (max 15), cyclomatic=16 (max 15)Issue 3 -- Severity: suggestion
complexity.cognitivearborist-metricsapplySchemeParameterscognitive=16 (max 15), cyclomatic=13 (max 15)Interpreter
Independent read of the diff (not the author). Design add-parameter sends
addParameter: trueand exactly one parameter, and omits name, generator, description, content type, and template.updateSchemevalidates 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 usesIPSLocationScheme.addParameterand assigns a missingSCHEMEPARAMIDonly on a realPSLocationScheme. Cancel, empty fields, and HTTP 400/403/409 leave the previous list. Companions are present:locationSchemeAddParameter.tsplus Vitest,ContextsPanel,PSPublishingDesignRestServiceTest, PlaywrightdesignLocationSchemeAddParameter.spec.js, andproduct-docs/8.2/admin/publishing.md. No new filesystem path joins. No agent rule files.wrapLocationSchemenow nests parameters asparameters.schemeParameter. The existing Jackson test still shows a bareschemeParameterarray binds, and a bareparametersarray 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.cognitiveonupdateScheme,prepareSchemeParameterAddition, andapplySchemeParameters. Severity suggestion, not a bug.Recommendation: approve. May commit/push: yes.