-
Type:
Bug
-
Resolution: Answered
-
Priority:
Low
-
None
-
Affects Version/s: 8.9.1, 8.19.10
-
Component/s: API - REST
-
3
-
Severity 2 - Major
-
3
Issue Summary
- Export > Users (feature of the Admin > Users page: <Base_URL>/admin/users) doesn't include all the users from Crowd directory
- The list of users fetched by the GET Users REST API endpoint is also incomplete.
- Bitbucket instances having a large number of user entries in the cwd_user table with usernames that contain special characters such as apostrophe are impacted
This is reproducible on Data Center: yes
Steps to Reproduce
- Create a Bitbucket Instance with a large set of users (~60,000 users) with some users having special characters in the username such as an apostrophe using an Active directory or Crowd
- Bitbucket should be connected to an external database such as Postgres having collation en_US.UTF-8
- Note the count of the active and unique users from the cwd_user table in the database.
- Export all users from Bitbucket's web interface and note the count of the unique users returned in the resulting CSV file.
- Also run the GET Users REST API endpoint API and check the number of unique users returned in the total response for all pages.
- Increment / decrement the size of the property page.max.user and repeat the tests and note the difference.
- Note that customising this value may cause some missing users to appear but does not guarantee the correct export data.
Expected Results
- The export file, or the list of users fetched by the GET Users REST API endpoint contains the same number of unique users as the cwd_user table, with no duplicates.
Actual Results
- Some users are duplicated while others are missing.
- The total number of users in the export file may be the same as the total number of users in the cwd_user table, but the export file is still incorrect.
- Duplicates in the exported user list account for the difference between unique usernames and total number of users returned.
Workaround
- Follow the steps in the knowledge article to understand the root cause and resolve this issue:
https://support.atlassian.com/bitbucket-data-center/kb/missing-or-duplicate-users-with-get-users-api-from-postgres-in-bitbucket-dc/ - You may query the cwd_user table directly using a query such as:
SELECT * FROM cwd_user WHERE is_active = 'T' - Using the crowd API directly to export the list of users.
- mentioned in
-
Page Loading...