Change in group membership in Jira is not reflected in Bamboo

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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

Jira is being used as a User Repository by Bamboo. A user has been removed from a Group directly from the Jira database, the change was not propagated to Bamboo.

Environment

Jira Server/Data Center 9.0.0 and any higher version.

Diagnosis

Due to an internal requirement, you had to remove the user from a particular group directly from the cwd_membership table:

1 delete from cwd_membership where child_id=xxx and parent_name='<group_name>';

But, even after running Synchronization several times, this change is not being reflected in Bamboo.

Cause

When you remove a user from a group using Jira UI, Jira will trigger an userMembershipEvent event, which will be populated with something like this:

1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?><events newEventToken="7334558724455861721:32"><userMembershipEvent><operation>DELETED</operation><childUser name="myusername"><link href="http://localhost:8080/rest/usermanagement/1/user?username=myusername" rel="self"/></childUser><parentGroups><group name="mygroupname"><link href="http://localhost:8080/rest/usermanagement/1/group?groupname=mygroupname" rel="self"/></group></parentGroups></userMembershipEvent></events>

When you run synchronization in Bamboo, a GET will be sent to Jira, like this:

1 2022-11-30 11:01:56,832 DEBUG [atlassian-scheduler-quartz2.local_Worker-2] [RestExecutor] Constructed http://localhost:8080/rest/usermanagement/1/event/7334558724455861721%3A32

The problem is that when you do the change directly in the database, this userMembershipEvent event is never created. Synchronization is executed, but nothing is populated due to the absence of the userMembershipEvent.

Solution

Resolution

  • The change will be reflected when you restart Jira and execute the Synchronization in Bamboo;

  • In order to have all changes reflected in Bamboo without the requirement to restart Jira, you must change the group membership using Jira UI, which will trigger the userMembershipEvent.

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.