Attempting to add a user to a group before the groups have been sync'ed from the remote directory results in the following stack trace:

      com.atlassian.crowd.exception.runtime.OperationFailedException: Group already exists
      at com.atlassian.crowd.embedded.core.CrowdAdminServiceImpl.addUserToGroup(CrowdAdminServiceImpl.java:396)
      at com.atlassian.jira.user.util.UserUtilImpl.doAddUserToGroup(UserUtilImpl.java:501)
      at com.atlassian.jira.user.util.UserUtilImpl.addUserToGroup(UserUtilImpl.java:479)
      at com.atlassian.jira.user.util.UserUtilImpl.addUserToGroups(UserUtilImpl.java:516)
      at com.atlassian.jira.bc.group.DefaultGroupService.addUsersToGroups(DefaultGroupService.java:331)
      at com.atlassian.jira.web.action.admin.user.EditUserGroups.doExecute(EditUserGroups.java:85)
      at webwork.action.ActionSupport.execute(ActionSupport.java:165)
      at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:58)
      at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:139)
      at com.atlassian.jira.web.dispatcher.JiraWebworkActionDispatcher.service(JiraWebworkActionDispatcher.java:168)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      

      Steps to reproduce:

      • Create a read/write LDAP Directory in Jira.
      • Browse for a user that exists in LDAP (using the User Browser).
      • Select "Groups" link to edit groups
      • Select the "jira-users" from the list and click "Join"

      Expected:

      • User successfully added to "jira-users"

            [CWD-2213] Problem adding group membership before directory sync

            shihab added a comment -

            We may consider an incremental sync, ie. load up the group that we know that exists in the remote directory - but this will mean that we will need to load up all the associated users and child groups, since queries will execute on the data stored in the internal directory.

            shihab added a comment - We may consider an incremental sync, ie. load up the group that we know that exists in the remote directory - but this will mean that we will need to load up all the associated users and child groups, since queries will execute on the data stored in the internal directory.

            shihab added a comment -

            What should be the expected behaviour here? A blocking sync?

            shihab added a comment - What should be the expected behaviour here? A blocking sync?

              Unassigned Unassigned
              4c7409f97ecf James Wong
              Affected customers:
              0 This affects my team
              Watchers:
              0 Start watching this issue

                Created:
                Updated:

                  Estimated:
                  Original Estimate - 8h
                  8h
                  Remaining:
                  Remaining Estimate - 8h
                  8h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified