Context
JIRA XWIKI-18772 (label testneeded) asks to automate a
manual test: Disable Version Summaries.
The manual test scenario:
1. Edit a page → the version summary field ("Add summary...") is visible at the bottom.
2. Go to Administer Wiki → Editing → Edit Mode, set "Enable Version Summaries" to No, Save.
3. Edit the page again.
4. Expected: the version summary input field is no longer visible.
Is it already covered? No (partial overlap only).
EditIT.showAndHideEditComments() already exists and disables the comment field, but via a different
mechanism — the xwiki.editcomment.hidden config property. The two are distinct code paths:
┌─────────────────────────────┬─────────────────────────────────────────────────────────┬───────────────────────────────────────────────────────────────────┬─────────────────────────────────┐
│ Scenario │ Setting │ Velocity logic (editactions.vm:61-73) │ DOM result │
├─────────────────────────────┼─────────────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────┼─────────────────────────────────┤
│ Already tested (XWIKI-2487) │ xwiki.editcomment.hidden=1 → isEditCommentFieldHidden() │ Block entered, renders <input type="hidden" id="comment"> │ Element present but not visible │
├─────────────────────────────┼─────────────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────┼─────────────────────────────────┤
│ This ticket (XWIKI-18772) │ editcomment wiki pref = 0 → hasEditComment() │ #if(... && $xwiki.hasEditComment()) is false, whole block skipped │ No comment element at all │
└─────────────────────────────┴─────────────────────────────────────────────────────────┴───────────────────────────────────────────────────────────────────┴─────────────────────────────────┘
Confirmed in com.xpn.xwiki.XWiki#hasEditComment (oldcore, ~line 6942): it reads the editcomment
wiki preference first ("1"→true, "0"→false), then falls back to config xwiki.editcomment (default 0).
In XWiki Standard the field is shown by default, so the editcomment wiki preference is effectively enabled.
So the admin "Enable Version Summaries" toggle (the actual subject of the ticket) is not tested today.
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.