Please share any images or screenshots, if relevant.
Share all details related to your problem, including any error messages you may have received.
The access request comment is OOTB, if we enable “Require comments for all access items” it will be mandatory for all access request. How we can make the comment section madatory for specific application group access request.
@iamksatish , I have written the following code however during access request the rule is not getting executed
List result = new ArrayList();
System.out.println(“Entering to the rule>>>”);
// Check requestItem attribute to see if it has requiresComment enabled
if (requestedItem != null) {
System.out.println(“Entering to the request>>>>>” +requestedItem);
boolean required = false;
System.out.println("Entering to the require>>>>>" +required);
if (requestedItem instanceof ManagedAttribute) {
System.out.println("Entering to the manage");
String appName=((ManagedAttribute)requestedItem).getApplication().getName();
System.out.println("Entering to the manage1");
Custom reqCommAppListCustm=context.getObjectByName(Custom.class,"");
System.out.println("Entering to the manage2");
if(null!=reqCommAppListCustm) {
List reqCommAppList = reqCommAppListCustm.get("APPLICATION_NAME");
if(null!=reqCommAppList && !reqCommAppList.isEmpty()&& reqCommAppList.contains(appName)) {
required = new Boolean(((ManagedAttribute)requestedItem).getAttribute("requiresComment"));
}
}
}
if (required) {
// in this case the required param is dynamic and depends on the extended attribute requiresAttachment
result.add(new AccessRequestConfigDTO(required, "Comment required for requested item."));
}