Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

How to save custom comments while choosing "Create Version" option during re-upload an asset in DAM?

Avatar

Level 3

We could see when we re-upload an existing asset in DAM, A Name Conflict dialog opens to save the asset as Version using "Create Version" button. In Timeline, it shows default Label/Comment as "New Version 1.x".


I need options as Textfield to take user custom Comment/Label during "Create Version" and display this custom comment entered by user in Timeline view instead of system generated comment "New Version 1.x"
I am looking for  the solution of above scenario, but didn't find any helpful solution yet. 
Please provide the valuable solution.

 

Regards, Mayank

3 Replies

Avatar

Community Advisor

hi @mayank-saxena1987 ,

 

1. when you re-upload asset it will ask to create version. just click. on it

MayurSatav_1-1683288267443.png

 

2. then select that asset and click timeline.

MayurSatav_2-1683288362265.png

 

3. select the version to which you want to add custom comment.

 

MayurSatav_0-1683288115911.png

 

Avatar

Level 3

Hi @MayurSatav This does not solve my need. I tried the above steps, It gives two option. Revert to this Version and Preview Version. After selecting asset from timeline, and adding comment and label and choosing Revert to this version-> creates a new version instead of adding the comment for the version created during re-upload of asset. This is not my need. I want to add custom comment for the same version created during re-upload of asset.

Avatar

Level 3

I tried the below solution for this to customize the same. We can achieve this by below steps:-

1. overriding /apps/dam/gui/coral/components/admin/timeline/events/version/version.jsp and /apps/dam/gui/coral/components/commons/fileupload/clientlibs/fileupload/js/fileupload.js files from /libs to /apps.

2. In fileupload.js file add custom coral dialog within existing code  createVersionButton.on("click", function(){...}) and call the servlet to save the custom comment within /<asset-path>/jcr:content.

3. version.jsp could be used to read and display the same saved custom comment in timeline. since the version would also save the custom comment existing code can be used to tread the same comment.

Sample: String comment = nd.getPropert("customcomment").getString();