XWiki Platform
  1. XWiki Platform
  2. XWIKI-14160

Add support for specifying the version summary when uploading a file with the Attachment Selector

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 9.2
    • Fix Version/s: 9.5-rc-1
    • Component/s: Attachments
    • Labels:
      None
    • Difficulty:
      Easy
    • Similar issues:

      Description

      The version summary is currently auto-generated.

        Activity

        Hide
        Marius Dumitru Florea added a comment -

        I added a "versionSummary" boolean parameter to the Attachment Selector macro. The default value is false, so the version summary input is not displayed by default. If you want to display the version summary in the Attachments tab, you need to modify attachmentlist.vm and add something like this:

        <div class="comment">$!escapetool.xml($attach.comment)</div>
        

        after the line that displays the file size for instance.

        Show
        Marius Dumitru Florea added a comment - I added a "versionSummary" boolean parameter to the Attachment Selector macro. The default value is false, so the version summary input is not displayed by default. If you want to display the version summary in the Attachments tab, you need to modify attachmentlist.vm and add something like this: <div class="comment">$!escapetool.xml($attach.comment)</div> after the line that displays the file size for instance.
        Hide
        Vincent Massol added a comment - - edited

        Does this obey the config options from xwiki.cfg, i.e. the xwiki.editcomment.* properties:

        xwiki.editcomment=1
        
        #-# Hide editcomment field and only use Javascript
        # xwiki.editcomment.hidden=0
        
        #-# Make edit comment mandatory
        xwiki.editcomment.mandatory=$xwikiCfgEditCommentMandatory
        
        #-# Make edit comment suggested (asks 1 time if the comment is empty.
        #-# 1 shows one popup if comment is empty.
        #-# 0 means there is no popup.
        #-# This setting is ignored if mandatory is set
        # xwiki.editcomment.suggested=0
        

        ?

        Thanks

        Show
        Vincent Massol added a comment - - edited Does this obey the config options from xwiki.cfg, i.e. the xwiki.editcomment.* properties: xwiki.editcomment=1 #-# Hide editcomment field and only use Javascript # xwiki.editcomment.hidden=0 #-# Make edit comment mandatory xwiki.editcomment.mandatory=$xwikiCfgEditCommentMandatory #-# Make edit comment suggested (asks 1 time if the comment is empty. #-# 1 shows one popup if comment is empty. #-# 0 means there is no popup. #-# This setting is ignored if mandatory is set # xwiki.editcomment.suggested=0 ? Thanks
        Hide
        Marius Dumitru Florea added a comment -

        The first two yes, see https://github.com/xwiki/xwiki-platform/commit/ad6312e3489ac2e1ab6c76db2cc229d672150825#diff-3146add013525983d2c33f425435bc74R224 . The other two no. Personally I find the mandatory version comment very annoying and I can't imagine how someone could use that. Now, the document version comment is at least displayed in the document history. The attachment version comment is not even displayed in the attachment history. I can add support for mandatory attachment comment in attachment selector but I feel that this is not going to be used by anyone.

        Show
        Marius Dumitru Florea added a comment - The first two yes, see https://github.com/xwiki/xwiki-platform/commit/ad6312e3489ac2e1ab6c76db2cc229d672150825#diff-3146add013525983d2c33f425435bc74R224 . The other two no. Personally I find the mandatory version comment very annoying and I can't imagine how someone could use that. Now, the document version comment is at least displayed in the document history. The attachment version comment is not even displayed in the attachment history. I can add support for mandatory attachment comment in attachment selector but I feel that this is not going to be used by anyone.
        Hide
        Ludovic Dubost added a comment -

        Great feature. We would need to display the summary in attachmentslist.vm and in viewattachrev.vm

        Ludovic

        Show
        Ludovic Dubost added a comment - Great feature. We would need to display the summary in attachmentslist.vm and in viewattachrev.vm Ludovic

          People

          • Assignee:
            Marius Dumitru Florea
            Reporter:
            Marius Dumitru Florea
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Date of First Response:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 1 day, 2 hours
              1d 2h