Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-15124

Tag tree not updated when copying a document having a tag via copyService

    Details

    • Type: Service Pack Request
    • Status: Closed (View Workflow)
    • Resolution: Won't Fix
    • Affects Version/s: 4.2.4
    • Fix Version/s: None
    • Component/s: Tags and Categories
    • Labels:
      None
    • Environment:
      Alfresco One 4.2.4
    • Bug Priority:
      Category 3
    • ACT Numbers:

      00543445

      Description

      [Summary]

      When using the copyService to copy a document including a tag from a source site location to a target site location (in this example using a workflow), the tag tree for the target site´s document library is never refreshing and showing the new tag.

      [Steps to reproduce]
      1. Create two public sites in Share, one named "Source" and one named "Target"
      2. Upload any document to the "Source" document library
      3. Give that document a tag "Support"
      4. Via the repository view jump to the document library folder of site "Target" and run the "View details" action for this folder
      5. From the URL, write down the nodeRef of the document library folder
      6. Shutdown the Alfresco instance
      7. Create an Eclipse Java project named "CopyServiceTag"
      8. Create the package "com.alfresco.support.dkoch" in that project
      9. Add the attached Java class CopyDelegate.java (making use of the copyService to copy a document to a target noderef) to this project and package
      10. Edit line 32 of this class and replace the noderef value with the value you wrote down in step 5, e.g.:

      final NodeRef targetFolder = new NodeRef("workspace://SpacesStore/c6b20904-4006-42d3-a1b6-74b8e9e964ae");
      

      11. To resolve compiling issues, reference the libraries in the build path of this project as shown in attached screenshot eclipseProject.png. Those libraries you will get in tomcat/webapps/alfresco/WEB-INF/lib:

      • activiti-engine*.jar
      • alfresco-data-model*.jar
      • alfresco-reposiotry*.jar
      • alfresco-remote-api*.jar
      • acegi-security*.jar
        12. After there are no more compiling errors, export the project as a jar file using Eclipse´s export function. Name the jar copyServiceTag.jar
        13. Copy copyServiceTag.jar to tomcat/webapps/alfresco/WEB-INF/lib
        14. Copy attached service-context.xml to tomcat/shared/classed/alfresco/extension
        15. STartup your Alfresco instance
        16. Via Activiti Explorer (http://localhost:8080/alfresco/activiti-admin) deploy the attached process copy.bpmn
        17. In Share, browse to the document you created in step 2 in the document library of site "Source"
        18. Run the document action "Start Workflow" on that document
        19. Select the workflow "Processus de copie"
        20. Click on "Start workflow" button
        21. Go to the document library of site "Target" and inspect the tag tree

      [Current behaviour]

      The tag tree is never showing the tag "Support" although the document was copied successfully and the tag is still there. See attached screenshot tagNotUpdated.png

      [Expected behaviour]

      The tag tree is refreshed asynchroniously, but still, the tag "Support" should appear there after a while.

      [Supporting evidence]

      • Reproduced on latest available Alfresco One 4.2.x service pack 4.2.4.
      • Workaround is to refresh tagscope cache manually using a javascript for the target site. See http://blog.alfrescian.com/?p=55

        Attachments

        1. copy.bpmn
          2 kB
        2. CopyDelegate.java
          3 kB
        3. eclipseProject.png
          eclipseProject.png
          66 kB
        4. service-context.xml
          1 kB
        5. tagNotUpdated.png
          tagNotUpdated.png
          197 kB

          Structure

            Activity

              People

              • Assignee:
                closedissues Closed Issues
                Reporter:
                dkoch Dennis Koch
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Structure Helper Panel