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

Sectional edit don't set edit comment

    XMLWordPrintable

Details

    • action

    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

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

            Dates

              Created:
              Updated:
              Resolved: