[Description]
Download as zip API does not include custom folders which are sub-types of cm:folder.
[Steps to reproduce]
Install alfresco 6.2.2.8 using the installer
Copy the provided context and model file to tomcat/shared/classes/alfresco/extension
Start alfresco
Login to share using the admin user
Copy the provided script "createFolderStructure.js" to Repository>Data Dictionary>Scripts
Click on "My Files" in the share menu
Create a new folder "forRules"
Click on the folder "forRules"
Create a new text file called "sample.txt"
Click on the "forRules" link in the breadcrumb to load the library view
Click again on the "forRules" link in the breadcrumb to load the folder details
Click on "Manage Rules"
Click on "Create Rules"
Enter a name for the rule ie "test rule", under "If all criteria are met" select "Name" and "Equals" value "sample.txt", this will ensure the rule only runs for the sample.txt file
Under "Perform Action" select "Execute Script" and select the script "createFolderStructure.js"
Click create
Click "Run Rules..." and select "Run rules for this folder"
Navigate the to sample site's document library and take note of the folder's "myroot" uuid
Execute the curl command below to download the folder "myroot"
This will return a donwload ID as the response. Take note of this ID.
In a browser go to
this will download the zip file.
Open the zip file and view the contents of the myroot folder
[Expected Behaviour]
The exploded folder contains one file "backuplog.txt" and two folders "CustomFolder" and "OotbFolder"
[Observed Behaviour]
The exploded folder contais one file "backuplog.txt" and the folder "OotbFolder".
[Analysis to date]
The API seems to be skipping custom type folders. The problematic line seems to be https://github.com/Alfresco/alfresco-repository/blob/master/src/main/java/org/alfresco/repo/download/ZipDownloadExporter.java#L137. This has been reported in the past and confirmed to be a bug but it has not been fixed:
https://issues.alfresco.com/jira/browse/ACE-4030
Â
tomcat, postgres