This issue has been created
 
 
Release Notes Application / cid:jira-generated-image-avatar-6df07bb8-7acc-4958-82c8-decec54d9d74 RN-88 Open

Two authors adding a change to the same release note at the same time are given the same entry page, and the second save overwrites the first

 
View issue   ·   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-ade7352b-8c40-4365-838e-459425baa741 Vincent Massol created this issue on 31/Aug/26 18:03
 
Summary: Two authors adding a change to the same release note at the same time are given the same entry page, and the second save overwrites the first
Issue Type: cid:jira-generated-image-avatar-6df07bb8-7acc-4958-82c8-decec54d9d74 Bug
Affects Versions: 2.0
Assignee: Unassigned
Components: Application
Created: 31/Aug/26 18:03
Priority: cid:jira-generated-image-static-major-1d28ec26-bbd3-4450-a97c-4816423441d1 Major
Reporter: Vincent Massol
Description:

Problem

Code/EntryVelocityMacros #handleAddAction computes the next entry name from the pages that already exist, then redirects the author to that name in the inline editor:

#set ($highest = $highestQuery.setLimit(1).execute())
... compute $nextUniqueNumber ...
$response.sendRedirect($xwiki.getURL(<...>.Entry###, 'edit', ...))

The new page only starts existing when the author saves. The window is therefore not milliseconds — it is the whole editing session.

Consequence

If two people click "Add ... Change" on the same release note before the first one saves, both compute the same Entry### name and both get an empty inline form for the same page. Last save wins, the other change is lost, and neither author gets a conflict warning.

This is the workflow the application exists for (a release manager and a committer filling in the same release note).

Possible fix

Create the page immediately from the template (empty) before redirecting, or loop until an unused name is found.

Secondary, same code

The candidate query orders by doc.space desc, which is a string sort, so past Entry999 the highest space is Entry999 rather than Entry1000 and the number 1000 is handed out repeatedly. This needs ~1000 entries in one version space, so it is much less likely to be hit than the concurrency case.