Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-1446

Sectional edit don't set edit comment

    Details

    • keywords:
      action
    • Similar issues:

      Description

      How to reproduce:

      edit some section in some document,
      write edit comment (aka version summary)
      save document

      edit comment do not saved.

      fix:
      SaveAction.java

      if (sectionNumber != 0) {
        XWikiDocument sectionDoc = (XWikiDocument) tdoc.clone();
        sectionDoc.readFromForm((EditForm) form, context);
        String sectionContent = sectionDoc.getContent() + "\n";
        String content = doc.updateDocumentSection(sectionNumber, sectionContent);
        tdoc.setContent(content);
        tdoc.setTitle(title);
        // this line is missing
        tdoc.setComment(sectionDoc.getComment());
      } else {
        tdoc.readFromForm((EditForm) form, context);
      }
      

        Attachments

          Activity

            People

            • Assignee:
              amelentev Artem Melentev
              Reporter:
              amelentev Artem Melentev
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: