[ALF-22056] onCopyCompleteBehaviour not called in order of copy-action Created: 10-Jan-19  Updated: 16-Oct-19  Resolved: 19-Feb-19

Status: Closed
Project: Alfresco
Component/s: Repository
Affects Version/s: Community Edition Next
Fix Version/s: ACS 201910-EA
Security Level: external (External user)

Type: Bug Priority: Major
Reporter: Jens Kluttig Assignee: Closed Issues
Resolution: Fixed Votes: 0
Labels: triaged
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
shadowed by REPO-4147 6.2: ALF-22056: onCopyCompleteBehavio... Done
Triage: MNT
Resolution Time Custom Field: 5 weeks, 4 days, 18 hours, 19 minutes, 45 seconds


If a folder with documents is copied then the onCopyComplete-Policy is not called in the exact order of the childs.


In our project we have a domain specific indentifier for children of a folder, which is added via a behaviour.


If a folder is copied, then this identifier is the same as in the copy-source.


The children are copied in the right order, but the identifier is added randomly.

Proposed solution:

I debugged this and found out that the problem is the implementation of an map in the CopyServiceImpl.copy method. This method holds all copied nodes on which later the onCopyComplete-Policy is executed. But this Map is a HashMap, which order is defined by the hashValue of its entries.

I thought this might be the best way to contribute my first code-changes via a pull-request.





Generated at Thu Jul 09 10:11:59 BST 2020 using JIRA 7.6.3#76005-sha1:8a4e38d34af948780dbf52044e7aafb13a7cae58.