Expand my Community achievements bar.

SOLVED

AEM: How to extend OOB 'Create Review Task' functionality for a single asset?

Avatar

Adobe Champion

I am trying to extend 'Create Review Task' OOB functionality to my project. Currently this is enabled only if we select a folder in assets section. My requirement is to make this available if we select an asset file as well instead of a folder.

P_V_Nair_0-1631553302583.png

 

 

Steps I did so far,

I tried to overlay the node inside libs - /libs/dam/gui/content/assets/jcr:content/actions/selection/createtask and created the same inside apps - /apps/dam/gui/content/assets/jcr:content/actions/selection/createtask as below

P_V_Nair_1-1631553417448.png

 

I was able to overlay this node and my text changes are also reflecting. But 'Create Review Task' is not getting displayed when I select a file. But i can see my changes when I select a folder, to confirm i have overlayed it. Have anyone worked on such a scenario to make this OOB functionality working for a single asset as well instead of a folder? Can someone help me on how to achieve this?

 

@arunpatidar @dvnSudheer 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @P_V_Nair,

List of allowed action for an asset or for a folder happens based on a logic considering ACLs, conditions specific to an action and few other related criteria. 

Logic for the same is handled separately for folder and for asset. 

 

For asset, it is exactly at this file - /libs/dam/gui/coral/components/admin/contentrenderer/base/assetBase.jsp (highlighted in green and the line in JSP file is the one to be added to have "Create Review Task action as part of asset selection")

 

Vijayalakshmi_S_0-1631676158414.png

Vijayalakshmi_S_1-1631677014265.png

But in order to overlay, we have few concerns

  • In the screenshot above, observe the highlighted in red, asset.jsp includes init/assetBase.jsp which in turn includes base/assetBase.jsp ( via <%@include file="") directly referencing the /libs path as opposed to mount point paths (/mnt/overlay or /mnt/override). Overlaying all three files has to be done in this case. 
  • Even if we do, "Create Review Task" would come up, actual functionality of this action for an asset would be incomplete. We cannot overlay any of the add Task/ review Task functionality as those are greyed /libs area where overlay is not allowed. 

In short, given the understanding of the above, it is not advisable to enable this action for an asset while the functionality is originally designed for folder/directory OOTB. 

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi @P_V_Nair,

List of allowed action for an asset or for a folder happens based on a logic considering ACLs, conditions specific to an action and few other related criteria. 

Logic for the same is handled separately for folder and for asset. 

 

For asset, it is exactly at this file - /libs/dam/gui/coral/components/admin/contentrenderer/base/assetBase.jsp (highlighted in green and the line in JSP file is the one to be added to have "Create Review Task action as part of asset selection")

 

Vijayalakshmi_S_0-1631676158414.png

Vijayalakshmi_S_1-1631677014265.png

But in order to overlay, we have few concerns

  • In the screenshot above, observe the highlighted in red, asset.jsp includes init/assetBase.jsp which in turn includes base/assetBase.jsp ( via <%@include file="") directly referencing the /libs path as opposed to mount point paths (/mnt/overlay or /mnt/override). Overlaying all three files has to be done in this case. 
  • Even if we do, "Create Review Task" would come up, actual functionality of this action for an asset would be incomplete. We cannot overlay any of the add Task/ review Task functionality as those are greyed /libs area where overlay is not allowed. 

In short, given the understanding of the above, it is not advisable to enable this action for an asset while the functionality is originally designed for folder/directory OOTB. 

Avatar

Adobe Champion

@Vijayalakshmi_S Really appreciate your time on getting back to me. I was able to enable 'Create Review Task ' button for an asset file as well, following your approach. But, if we want to enable the functionality as well for an asset, just wanted to understand why it is not recommended to enable this functionality at an asset level. Is it because we cannot overlay the required files, because they are greyed out and not recommended by Adobe to overlay them?

Avatar

Community Advisor

Hi @P_V_Nair,

Thanks for the confirmation. 

If you would have tried to test functionality of that action, in the process of reviewing an asset -> In reviewtd/payload.html (on click of "Review" CTA), it will list all the siblings of the selected asset though the item url is just the asset path.

In the screenshot below, we are not just reviewing the cart.png alone or This view is same as if you have triggered a review action on the folder level where cart.png resides.

Vijayalakshmi_S_0-1631715575572.png

 

Reason 1 : This calls for a change perhaps in Review or even at add task level which is greyed out. (Not allowed for overlaying - "Overlay Node" will be disabled for those greyed /libs areas)

Reason 2 : The 3 files that you are overlaying is not mount paths and direct /libs path inclusion. If there are any changes to these files at product level in future, you need to change it explicitly in the overlay paths every time.