Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-43580

com.atlassian.jira.issue.IssueManager.updateIssue not indexing issues after update.

    XMLWordPrintable

Details

    Description

      When using the updateIssue functions with the "DO_NOT_DISPATCH" option for events the modified issue is not re-indexed. Switching to the "ISSUE_UPDATED" event or similar fixes the issue.

      Example code snippet:

      MutableIssue updatedIssue = ComponentAccessor.getIssueManager().getIssueObject(currentIssue.getKey());
      
      updatedIssue.setReporter(ApplicationUsers.toDirectoryUser(issueParentComponent.getComponentLead()));
      
      UpdateIssueRequest updateIssueRequest = UpdateIssueRequest.builder().eventDispatchOption(EventDispatchOption.DO_NOT_DISPATCH).sendMail(false).build();
      
      Issue finalIssue = ComponentAccessor.getIssueManager().updateIssue(this.adminUser, updatedIssue, updateIssueRequest);
      

      This code will update the issue and if you go directly to the issue it shows the correct data. Incorrect data is shown when searching for issues in the issue navigator as the index is not up to date.

      Attachments

        Activity

          People

            ntran Nhat Tran
            ca4c2a1bf83d David Renaud
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: