Uploaded image for project: 'Alfresco One Platform'
  1. Alfresco One Platform
  2. ACE-2314

Error when Post Activity with "parentNodeRef"

    Details

      Description

      Hi, I have encountered a error when try to post a share activity (use Alfresco.Share.postActivity(...)) by providing a "parentNodeRef" rathan "nodeRef" in the data object.

      "Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/slingshot/activity/create-activity.post.json.js': 06222020 JSONObject["nodeRef"] not found."

      After had a look at the actual alfresco webscript (create-activity.post.json.js) get called, I have noticed the following code:

      /**

      • NodeRef & ParentNodeRef properties (must have at least one)
        */
        if (json.has("nodeRef")) { nodeRef = json.get("nodeRef"); data.nodeRef = nodeRef; m_node = search.findNode(nodeRef); }

        if (json.has("parentNodeRef"))

        { parentNodeRef = json.get("nodeRef"); data.parentNodeRef = parentNodeRef; m_parentNode = search.findNode(parentNodeRef); }

        if (nodeRef == null && parentNodeRef == null)

        { status.setCode(status.STATUS_BAD_REQUEST, "Must specify either 'nodeRef' or 'parentNodeRef' parameter when posting activity"); return; }

      It looks that the code "parentNodeRef = json.get("nodeRef")" should be "parentNodeRef = json.get("parentNodeRef")" ?

      It is a bug in Alfresco?

      Regards,

        Attachments

          Activity

            People

            • Assignee:
              closedissues Closed Issues
              Reporter:
              kroast Kevin Roast [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: