Details
-
Bug
-
Resolution: Unresolved
-
Major
-
2.7
-
None
-
Unknown
-
Description
Steps to reproduce
- In a wiki with no release note for the version 9.9 of XWiki, run as a user who may edit the ReleaseNotes.Data space:
{{velocity}} #set ($reference = $services.releasenotes.createChange({'product': 'XWiki', 'version': '9.9', 'title': 'Orphan'})) $reference {{/velocity}}
Expected
The call fails, as POST /rest/wikis/xwiki/releasenotes/XWiki/9.9/changes does (404 "There is no release note for the version [9.9] of [XWiki].").
Actual
The change is created in ReleaseNotes.Data.XWiki.9\.9.Entry001.WebHome, under a release note page that does not exist. No release note lists it, and the space is left with an orphan page.
The REST endpoint checks that the release note exists before creating a change, while the script service goes straight to the change manager.