Jira notification is not sent depending on Issue status

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.

    

Summary

Notification is not sent depending on Issue status

Environment

7.13.9

Diagnosis

This is the error message seen in the logs when Jira tried to send the notification:

2020-07-08 15:21:00,313 Sending mailitem com.atlassian.jira.mail.IssueMailQueueItem@3302b99e[issue=com.atlassian.jira.issue.IssueImpl@2d6a0364[id=10000,summary=IssueSummary,key=TST-1,created=2020-10-08 22:54:07.0,updated=2020-10-09 12:27:56.0,assignee=Marcus(marcus),reporter=Marcus(marcus)],remoteUser=marcus(marcus),notificationType=Current_Reporter,eventTypeId=6,templateId=6] ERROR anonymous    Mail Queue Service [c.a.jira.mail.MailingListCompiler] Failed adding mail for notification recipient: [email=marcus@email.com, user=Marcus(marcus)]
java.lang.NullPointerException
	at com.atlassian.jira.mail.util.MailAttachments$ImageAttachment.buildBodyPart(MailAttachments.java:228)
	at com.atlassian.jira.mail.util.MailAttachmentsManagerImpl.buildMimeBodyPartFromMailAttachment(MailAttachmentsManagerImpl.java:233)
	at com.atlassian.jira.mail.util.MailAttachmentsManagerImpl.lambda$buildAttachmentsBodyParts$0(MailAttachmentsManagerImpl.java:227)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1699)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
	at com.atlassian.jira.mail.util.MailAttachmentsManagerImpl.buildAttachmentsBodyParts(MailAttachmentsManagerImpl.java:229)
	at com.atlassian.jira.mail.builder.EmailRenderer.buildMailWithAttachments(EmailRenderer.java:135)
	at com.atlassian.jira.mail.builder.EmailRenderer.renderEmailBody(EmailRenderer.java:111)
	at com.atlassian.jira.mail.builder.EmailRenderer.render(EmailRenderer.java:150)
	at com.atlassian.jira.mail.builder.EmailBuilder.renderNow(EmailBuilder.java:155)
	at com.atlassian.jira.mail.builder.EmailBuilder.renderNowAsQueueItem(EmailBuilder.java:145)
	at com.atlassian.jira.mail.MailingListCompiler$1.evaluateEmailForRecipient(MailingListCompiler.java:336)
	at com.atlassian.jira.mail.NotificationRecipientProcessor.evaluateEmails(NotificationRecipientProcessor.java:39)
	at com.atlassian.jira.mail.MailingListCompiler.evaluateEmails(MailingListCompiler.java:267)
	at com.atlassian.jira.mail.MailingListCompiler.access$300(MailingListCompiler.java:49)
	at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.lambda$addEmailsToQueue$0(MailingListCompiler.java:466)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1699)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
	at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.addEmailsToQueue(MailingListCompiler.java:468)
	at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendLists(MailingListCompiler.java:438)
	at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.evaluateForEvent(MailingListCompiler.java:395)
	at com.atlassian.jira.mail.MailingListCompiler.prepareEmail(MailingListCompiler.java:167)
	at com.atlassian.jira.mail.MailingListCompiler.sendLists(MailingListCompiler.java:101)
	at com.atlassian.jira.mail.IssueMailQueueItem.send(IssueMailQueueItem.java:128)
	at com.atlassian.mail.queue.MailQueueImpl.sendBufferUnderLock(MailQueueImpl.java:103)
	at com.atlassian.mail.queue.MailQueueImpl.sendBuffer(MailQueueImpl.java:56)
	at com.atlassian.jira.mail.JiraMailQueue$1.apply(JiraMailQueue.java:51)
	at com.atlassian.jira.mail.JiraMailQueue$1.apply(JiraMailQueue.java:48)
	at com.atlassian.jira.util.velocity.DefaultVelocityRequestContextFactory.runWithStaticBaseUrl(DefaultVelocityRequestContextFactory.java:110)
	at com.atlassian.jira.util.DefaultBaseUrl.runWithStaticBaseUrl(DefaultBaseUrl.java:50)
	at com.atlassian.jira.mail.JiraMailQueue.sendBuffer(JiraMailQueue.java:48)
	at com.atlassian.jira.service.services.mail.MailQueueService.run(MailQueueService.java:21)
	at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:68)
	at com.atlassian.jira.service.ServiceRunner.runService(ServiceRunner.java:62)
	at com.atlassian.jira.service.ServiceRunner.runServiceId(ServiceRunner.java:44)
	at com.atlassian.jira.service.ServiceRunner.runJob(ServiceRunner.java:32)
	at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:153)
	at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:118)
	at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:97)
	at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.launchJob(CaesiumSchedulerService.java:443)
	at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeLocalJob(CaesiumSchedulerService.java:410)
	at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeQueuedJob(CaesiumSchedulerService.java:388)
	at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService$1.consume(CaesiumSchedulerService.java:285)
	at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService$1.consume(CaesiumSchedulerService.java:282)
	at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeJob(SchedulerQueueWorker.java:65)
	at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeNextJob(SchedulerQueueWorker.java:59)
	at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.run(SchedulerQueueWorker.java:34)
	at java.lang.Thread.run(Thread.java:748)

Cause

Status does not have an icon defined.

The following query should return all status that may be facing the same problem

select * from issuestatus where iconurl = '/';

Solution

Run the following Update to the database to set the generic png that is usually associated to status created in Jira as the icon for the status.

update issuestatus
set iconurl = '/images/icons/statuses/generic.png'
where iconurl = '/';

Last modified on Oct 9, 2020

Was this helpful?

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