-
Type:
Service Pack Request
-
Status: Open
-
Resolution: Unresolved
-
Affects Version/s: 6.2, 5.2.7
-
Fix Version/s: 6.2.N
-
Component/s: ACS REST API
-
Labels:None
-
Bug Priority:
-
ACT Numbers:
01016856
-
Premier Customer:Yes
Summary
When using a custom content type with a custom property to store a username, it is not possible to display the person's display name in an ADF application using the REST API.
Although the REST API would perform a person lookup on known properties storing usernames such as cm:creator, cm:modifier or cm:owner, it is not possible to have custom person properties do the same and display a user-friendly name in an ADF application.
Supporting evidence
Define a custom model with a custom property to store a username using a people picker in ADF, e.g. acme:supervisor of type d:text.
The check for username storing properties is done in NodesImpl.java#1208 if the property of the node is part of the list "PROPS_USERLOOKUP".
In NodesImpl.java#338, the attribute "PROPS_USERLOOKUP" is 'public static' but 'final' and moreover populated using Arrays.asList(), therefore the list cannot be replaced and values cannot be added to it.
public static final List<QName> PROPS_USERLOOKUP = Arrays.asList( ContentModel.PROP_CREATOR, ContentModel.PROP_MODIFIER, ContentModel.PROP_OWNER, ContentModel.PROP_LOCK_OWNER, ContentModel.PROP_WORKING_COPY_OWNER);
This list is also used to retrieve person information on search results in PersonPropertyLookup.java#L68.
Expected Behaviour
It is possible to configure a list of custom properties that would output the person's display name.
Observed Behaviour
It is not possible to specify custom properties that would retrieve the person's information based on the username stored.
Workaround
It is only possible to override the defined values of the list "PROPS_USERLOOKUP", e.g. NodesImpl.PROPS_USERLOOKUP.set(3, PROP_ACME_SUPERVISOR);