Uploaded image for project: 'Alfresco'
  1. Alfresco
  2. ALF-20221

onUpdateNode and onUpdateProperties returns incorrect value on cm:name updates

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 4.2.c Community
    • Fix Version/s: None
    • Component/s: Repository
    • Security Level: external (External user)
    • Labels:
      None
    • Environment:
      Ubuntu 12.04
      Bundle install througth alfresco-community-installer-linux-64.bin

      Description

      1. Implement custom behaviour for onUpdateNode or onUpdateProperties

      (for example)

      ...
      public void init()

      { .... this.onUpdateProperties = new JavaBehaviour( this, "onUpdateProperties", NotificationFrequency.FIRST_EVENT); this.policyComponent.bindClassBehaviour( QName.createQName(NamespaceService.ALFRESCO_URI, "onUpdateProperties"), ContentModel.TYPE_BASE; this.onUpdateProperties); ... }

      @Override
      public void onUpdateProperties(NodeRef nodeRef, Map before, Map after)

      { String old_name = before.get(ContentModel.PROP_NAME); String new_name = after.get(ContentModel.PROP_NAME); if(logger.isDebugEnabled()) logger.debug("Old name was : " + old_name + " , new name is : " + new_name); return; }

      ...

      2. Update any node name throught Alfresco Share's "edit properties" UI Action
      3. Check the "after" value returned for cm:name
      (other propierties work just fine)

      4. I get

      {{http://www.alfresco.org/model/content/1.0}name=1522aa8e-c43e-48f9-9b65-099fb4d2c1d8

      instead of

      {{http://www.alfresco.org/model/content/1.0}name=new_name.txt

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                closedissues Closed Issues
                Reporter:
                mikel.asla Mikel Asla
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

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