Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-28144

UserCreationListener e-mail spam during JIRA migration

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for JIRA Cloud. Using JIRA Server? See the corresponding bug report.

      In jira-ondemand-project/jira-ondemand-plugins/jira-ondemand-theme-plugin/src/main/java/com/atlassian/studio/jira/haup/UserCreationListener.java the following code currently exists:

              for (com.atlassian.crowd.embedded.api.User user : userUtil.getAllUsersInGroups(permissionManager.getGroupsWithPermission(Permissions.ADMINISTER)))
              {   
                  Email email = new Email(user.getEmailAddress());
                  email.setSubject(i18n.getText("studio.jira.email.grant.failure.conflictnotification.subject"));
                  email.setMimeType("text/html");
                  email.setBody(emailBody);
                  mailQueue.addItem(new SingleMailQueueItem(email));
              }   
      

      As everyone on jira-dev (and many people outside of jira-dev) noticed when 2 migrations I attempted failed to upgrade over 100 of the users, spamming one e-mail per failed user is really unacceptable. This needs to be changed to coalesce multiple failures with the same target address.

      It looks like onUserCreation also tries to exempt UserCreatedFromDirectorySynchronisationEvent messages, so perhaps doing something similar to ignore failures during data migration would be a simpler option.

      Attachments

        Issue Links

          Activity

            People

              ohookins@atlassian.com Oliver Hookins (Inactive)
              cfuller crf
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: