Some user management operations are not available in Jira Server/DC after restoring a Cloud backup

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Some user management operations such as user creation, user password reset, etc. are missing after migrating the data using an XML backup from Jira Cloud to Jira Server/DC.

Environment

Jira Server/Data Center after restoring a Cloud backup.

Diagnosis

# select * from cwd_directory_operation;
 directory_id | operation_type
--------------+----------------
(0 rows)


Cause

The cause of this issue is still unknown but the issue was observed after restoring an XML backup generated from Jira Cloud.

Solution

  1. Stop Jira
  2. (warning) Take a backup of your database
  3. Run this SQL query to create the missing operations (This was tested with  Postgres):

    # insert into cwd_directory_operation(directory_id,operation_type) values (1,'CREATE_GROUP'), (1,'CREATE_ROLE'), (1,'CREATE_USER'), (1,'DELETE_GROUP'), (1,'DELETE_ROLE'), (1,'DELETE_USER'), (1,'UPDATE_GROUP'), (1,'UPDATE_GROUP_ATTRIBUTE'), (1,'UPDATE_ROLE'), (1,'UPDATE_ROLE_ATTRIBUTE'), (1,'UPDATE_USER'), (1,'UPDATE_USER_ATTRIBUTE');
    INSERT 0 12
  4. Run this SQL query to confirm the operations were added:

    # select * from cwd_directory_operation;
     directory_id |     operation_type
    --------------+------------------------
                1 | CREATE_GROUP
                1 | CREATE_ROLE
                1 | CREATE_USER
                1 | DELETE_GROUP
                1 | DELETE_ROLE
                1 | DELETE_USER
                1 | UPDATE_GROUP
                1 | UPDATE_GROUP_ATTRIBUTE
                1 | UPDATE_ROLE
                1 | UPDATE_ROLE_ATTRIBUTE
                1 | UPDATE_USER
                1 | UPDATE_USER_ATTRIBUTE
    (12 rows)
  5. Start Jira and confirm you can perform the user management operations now.


Last modified on Sep 28, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.