[xwiki-contrib/application-releasenotes] 668962: RN-119: A change cannot be updated once created, s...
Branch: refs/heads/RN-119 Home: https://github.com/xwiki-contrib/application-releasenotes Commit: 668962be4096db70c46fe5a91549fa56b5487890 https://github.com/xwiki-contrib/application-releasenotes/commit/668962be409... Author: Vincent Massol <[email protected]> Date: 2026-09-10 (Thu, 10 Sep 2026) Changed paths: M application-releasenotes-api/pom.xml M application-releasenotes-api/src/main/java/org/xwiki/contrib/releasenotes/ChangeManager.java M application-releasenotes-api/src/main/java/org/xwiki/contrib/releasenotes/ReleaseNoteManager.java A application-releasenotes-api/src/main/java/org/xwiki/contrib/releasenotes/ReleaseNotesNotFoundException.java M application-releasenotes-api/src/main/java/org/xwiki/contrib/releasenotes/internal/DefaultChangeManager.java M application-releasenotes-api/src/main/java/org/xwiki/contrib/releasenotes/internal/DefaultReleaseNoteManager.java M application-releasenotes-api/src/main/java/org/xwiki/contrib/releasenotes/script/ReleaseNotesScriptService.java M application-releasenotes-api/src/test/java/org/xwiki/contrib/releasenotes/internal/DefaultChangeManagerTest.java M application-releasenotes-api/src/test/java/org/xwiki/contrib/releasenotes/internal/DefaultReleaseNoteManagerTest.java M application-releasenotes-api/src/test/java/org/xwiki/contrib/releasenotes/script/ReleaseNotesScriptServiceTest.java A application-releasenotes-rest/src/main/java/org/xwiki/contrib/releasenotes/rest/ChangeResource.java A application-releasenotes-rest/src/main/java/org/xwiki/contrib/releasenotes/rest/ReleaseNoteResource.java M application-releasenotes-rest/src/main/java/org/xwiki/contrib/releasenotes/rest/internal/AbstractReleaseNotesResource.java A application-releasenotes-rest/src/main/java/org/xwiki/contrib/releasenotes/rest/internal/DefaultChangeResource.java M application-releasenotes-rest/src/main/java/org/xwiki/contrib/releasenotes/rest/internal/DefaultChangesResource.java A application-releasenotes-rest/src/main/java/org/xwiki/contrib/releasenotes/rest/internal/DefaultReleaseNoteResource.java M application-releasenotes-rest/src/main/java/org/xwiki/contrib/releasenotes/rest/internal/ReleaseNotesExceptionMapper.java M application-releasenotes-rest/src/main/java/org/xwiki/contrib/releasenotes/rest/internal/RepresentationFactory.java M application-releasenotes-rest/src/main/java/org/xwiki/contrib/releasenotes/rest/model/ChangeRepresentation.java M application-releasenotes-rest/src/main/resources/META-INF/components.txt A application-releasenotes-rest/src/test/java/org/xwiki/contrib/releasenotes/rest/internal/DefaultChangeResourceTest.java A application-releasenotes-rest/src/test/java/org/xwiki/contrib/releasenotes/rest/internal/DefaultReleaseNoteResourceTest.java M application-releasenotes-rest/src/test/java/org/xwiki/contrib/releasenotes/rest/internal/ReleaseNotesExceptionMapperTest.java M application-releasenotes-rest/src/test/java/org/xwiki/contrib/releasenotes/rest/internal/RepresentationFactoryTest.java M application-releasenotes-test/application-releasenotes-test-docker/src/test/it/org/xwiki/contrib/releasenotes/test/ui/ReleaseNotesRestClient.java M application-releasenotes-test/application-releasenotes-test-docker/src/test/it/org/xwiki/contrib/releasenotes/test/ui/ReleaseNotesRestIT.java Log Message: ----------- RN-119: A change cannot be updated once created, so its screenshots cannot be set over REST * Add `PUT` and `GET` on one release note and on one change, so the two properties that could not be written after creation now can: the `screenshots` of a change, which name attachments of a page the `POST` itself allocates, and the `released`/`date` of a release note, which are known on the day the version ships. * A change is addressed by its entry page name, `.../changes/Entry001`, which `ChangeRepresentation` now answers as `entry` so a client never parses it out of a page reference. * A `PUT` replaces: the stored release note or change becomes exactly what the request carries, and a property the request leaves out is emptied rather than kept. The templates apply to creation only. * The product and the version are not replaced by either: they locate the page, so changing them would be a move rather than an update. * Add `ChangeManager#updateChange` and `ReleaseNoteManager#updateReleaseNote`, both answering what is stored once replaced, and expose them on the script service. * Add `ReleaseNotesNotFoundException`, thrown when a page holds no change or no release note and mapped to a `404`, which is what the two `GET`s and the two `PUT`s answer with. * Modify a copy of the page rather than the instance the store cached, since these are the first writes of the application to a page that already exists. * Ignore the two `java.method.addedToInterface` differences in Revapi: both roles are `@Unstable` and this repository holds their only implementations. * `ReleaseNotesRestIT` walks the flow the issue is about, from creating a change through attaching its image to naming it, and the `-api` JaCoCo ratio moves to 0.95 for the two store-failure blocks the test store cannot reach. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> To unsubscribe from these emails, change your notification settings at https://github.com/xwiki-contrib/application-releasenotes/settings/notificat...
participants (1)
-
XWiki Notifications