IdentityIQ - Adding manager displayName in certification export

Adding Manager DisplayName in Certification export

Below is the sample Java code , this need to be deployed as the class / jar file .

import sailpoint.object.Identity;
import sailpoint.tools.GeneralException;
import sailpoint.tools.Util;
import sailpoint.web.view.certification.CertificationItemColumn;
import java.util.Map;
import org.apache.log4j.Logger;

public class UserManagerColumnEvaluator extends CertificationItemColumn {

    private static final String COL_IDENTITY_ID = "Identity.id";
    Logger logger = Logger.getLogger("vkejriwal.evaluator.UserManagerColumnEvaluator");

    public Object getValue(Map<String, Object> row) throws GeneralException {
        String identityId = (String) row.get(COL_IDENTITY_ID);
        if (Util.isNotNullOrEmpty(identityId)) {
            Identity identity = this.getSailPointContext().getObjectById(Identity.class, identityId);
            if (null != identity && null != identity.getManager()) {
                return identity.getManager().getDisplayName();
            }
        }
        return null;
    }

}

Changes need to be done on UI config
uiCertificationExportColumns
uiDataOwnerCertificationExportColumns

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE sailpoint PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<sailpoint>
	<ImportAction name="merge">
		<UIConfig name="UIConfig">
			<Attributes>
				<Map>
					<entry key="uiCertificationExportColumns">
						<value>
							<List>
								<ColumnConfig dataIndex="Identity-ManagerDisplayName" 
								evaluator="com.vkejriwal.iga.certification.ui.UserManagerColumnEvaluator" 
								groupProperty="Identity.id" headerKey="Manager DisplayName" 
								hideable="true" property="Identity.id" sortProperty="Identity.id" 
								stateId="Identity-ManagerDisplayName"/>
							</List>
						</value>
					</entry>
					<entry key="uiDataOwnerCertificationExportColumns">
						<value>
							<List>
								<ColumnConfig dataIndex="Identity-ManagerDisplayName" 
								evaluator="com.vkejriwal.iga.certification.ui.UserManagerColumnEvaluator" 
								groupProperty="Identity.id" headerKey="Manager DisplayName" 
								hideable="true" property="Identity.id" sortProperty="Identity.id" 
								stateId="Identity-ManagerDisplayName"/>
							</List>
						</value>
					</entry>
				</Map>
			</Attributes>
		</UIConfig>
	</ImportAction>
</sailpoint>
3 Likes

this is helpful… thanks

1 Like

Wouldn’t this ColumnConfig be equivalent?

            <ColumnConfig dataIndex="Identity-manager-displayName" groupProperty="Identity.manager.displayName" headerKey="Manager DisplayName" property="Identity.manager.displayName" sortProperty="Identity.manager.displayName" stateId="Identity-manager-displayName"/>
1 Like

This is pretty straight compare to writting the custom logic.

I don’t think this works for Certification export Do you want to give a try ?

I don’t think this works for Certification export can you give a try ?

I tried it in the uiCertificationExportColumns before posting it. It seemed to work, although I didn’t test it very much. Thinking about it a little more, I’m not sure if it will work properly if the identity has no manager. Using a property of the manager might do an implicit inner join and hide rows where the identity has no manager, which would be a problem. Can you give it a try?

Edit: Just checked and getting the displayName my way does not do an implicit inner join. Identities without managers should still show up.

Thanks for update . I tried in 8.1 and it didn’t worked for us so we have written this code . what version you tried ?

Interesting. I did this with 8.4. I’m surprised it didn’t work in 8.1, since I wouldn’t expect column configs to work any differently there. Is there a display_name database column in 8.1?

Hi @vishal_kejriwal1,

I have tried it in both environments (8.1 & 8.4) then it worked for me. it will work for all the versions as per my knowledge.

Thanks for fir the update .

Hi,

Once I compile the Java file into a .class, could you please let me know the exact folder where I should copy it? I apologize if this is a basic question, but I’m relatively new to SailPoint IQ and haven’t done this before.

I assume that the location where I upload the class will also affect the evaluator value, so I want to make sure I get it right.

Thank you in advance for your help!

easy way would be create a jar file and copy that to WB-INF/lib directory. don’t forget to restart application .

Hello again. First of all, thank you for answering me, but I still haven’t been able to solve my problem.

I created the abb_custom_evaluator.jar with the following structure:

abb_custom_evaluator.jar 
	|- customabb
		|- columnconfig
			|- UserCenterColumnEvaluator.class

I copied the .jar to ./WEB-INF/lib/

Then added the following line:

<ColumnConfig dataIndex="Identity-Center" evaluator="customabb.columnconfig.UserCenterColumnEvaluator" groupProperty="Identity.id" headerKey="Center" hideable="true" property="Identity.id" sortProperty="Identity.id" stateId="Identity-Center"/>

To the UI Configuration in:
uiCertificationExportColumns
uiDataOwnerCertificationExportColumns

Then restarted the application.

And still doesn’t work. I even added a system.out.println in the .class to check if SailPoint at least calls the method but it doesn’t print anything in the console.

I would very much appreciate if you can help me.