This issue has been created
There are 2 updates.
This issue has been deleted
 
 
Release Notes Application / cid:jira-generated-image-avatar-8ff7fb2c-b5f3-4180-90fb-b80d10613376 RN-118

A REST creation endpoint answers with the values posted rather than the values stored

 

Issue created

 
cid:jira-generated-image-avatar-f177c307-5e3c-4ac5-8a22-4c77c4f635f3 Vincent Massol created this issue on 09/Sep/26 15:56
 
Summary: A REST creation endpoint answers with the values posted rather than the values stored
Issue Type: cid:jira-generated-image-avatar-8ff7fb2c-b5f3-4180-90fb-b80d10613376 Bug
Affects Versions: 2.7
Assignee: Unassigned
Components: Application
Created: 09/Sep/26 15:56
Priority: cid:jira-generated-image-static-major-3ba449f5-8984-4635-bb31-4cf8132a0156 Major
Reporter: Vincent Massol
Description:

The two REST endpoints that create something answer 201 Created with a body built from the request rather than from the page they just wrote, so a client is told values the wiki does not hold.

Creation is template-driven, and a property the caller leaves out keeps the default its template gives it. Since the response is built from the posted representation, every such default is reported as null.

Steps to reproduce

  • POST /rest/wikis/xwiki/releasenotes/XWiki/8.3/changes with a body carrying a title and no importance.

Actual result

The response body says "importance": null, while the page it created stores the importance ChangeTemplate gives a change, which is 1 (Medium) since RN-117.

Expected result

The response describes the change that was created, its importance included.

Also

POST /rest/wikis/xwiki/releasenotes has the same shape, so it under-reports every value the release note manager supplies — in particular the product, which comes from the wiki configuration when the caller posts none.

These endpoints exist to be called by an agent creating release notes, which is precisely a client that trusts the 201 body and records from it. Both endpoints are fixed together.

 
 

2 updates

 
cid:jira-generated-image-avatar-f177c307-5e3c-4ac5-8a22-4c77c4f635f3 Changes by Vincent Massol on 09/Sep/26 15:56
 
Fix Version: 2.7
Assignee: Vincent Massol
 
 

Issue deleted

 
cid:jira-generated-image-avatar-f177c307-5e3c-4ac5-8a22-4c77c4f635f3 Vincent Massol has deleted this issue on 09/Sep/26 16:02