Error exporting uses when working with user custom fields, different instances, and setting the portal property "users.export.csv.fields"

Fix Priority

2

Components

Affects versions

Git Pull Request

Description

Suppose that you have several Instances in a Liferay environment and add a custom field to the user object only in one of these instances. If you add this new custom field to the portal property "users.export.csv.fields" to add this one in the list of the attributes exported, the Instances that do not have this custom field fail when a users export is done.

The steps to reproduce the case are:

  1. Create an Instance called IntanceA.

  2. Create a user in the InstanceA.

  3. Create an Instance called IntanceB.

  4. Create a user in the InstanceB.

  5. Create a user custom field in the InstanceA called custom1.

  6. Add the property "users.export.csv.fields" to the portal-ext.properties with the value "users.export.csv.fields=fullName,emailAddress,expando:custom1".

  7. Restart Liferay.

  8. Go to InstanteB and try to export the users.

Expected result :

The export is done, and the custom1 column is empty. It must be empty because it does not exist in InstanceB.

Actual result :

An error happens, and the interface goes block. In the log file, the following error trace is registered.

 

Log output:

 

Activity

Show:

Sharry Shi May 23, 2021 at 11:28 PM

PASSED Manual Testing following the steps in the description.

Fixed on:
Tomcat 9.0.43 + MySQL 5.7. Portal master GIT ID: ff233ddff28bd28f93c60c06cc25234779e2c14c.

The export is done, and the custom1 column is empty on InstanceB.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Branch Version/s

7.3.x
7.2.x
7.1.x
7.0.x

Backported to Branch

Committed

Zendesk Support

Created April 12, 2021 at 7:30 AM
Updated July 13, 2022 at 2:54 PM
Resolved May 21, 2021 at 8:40 AM