Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-8933

When adding a comment, fired event loses the comment property

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.5.0-HF03
    • Fix Version/s: 5.5.0-HF05, 5.6-RC1, 5.6
    • Component/s: Comments, Core
    • Environment:
      Linux 2.6.35-30 x64 - Nuxeo CAP-DM-DAM-SC - PostgreSQL
    • Backlog priority:
      400
    • Upgrade notes:
      Hide

      The Comment document is now stored in the property "comment_document"

      Show
      The Comment document is now stored in the property "comment_document"

      Description

      When adding a comment, fired event loses the comment property.

      Comment is fired by org.nuxeo.ecm.platform.comment.impl.CommentManagerImpl.notifyEvent(...)
      The fired event contains 3 properties :

      • "comment" : The comment DocumentModel
      • "comment_text" : The comment text as a String
      • "category" : The comment category as a String

      While setting the properties in the org.nuxeo.ecm.core.event.impl.DocumentEventContext.setProperties(..) method, the property "comment" is sets to null.
      That's due to some code which expects "comment" property to be typed String instead of DocumentModel

      I think there may be a mistake between "comment" and "comment_text" properties.
      see org.nuxeo.ecm.core.event.impl.DocumentEventContext.COMMENT_PROPERTY_KEY value

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: