Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jira: Creating Issues and Comments from Email with no subject

Tags:

jira

I'm looking for a way to control the way the "Creating Issues and Comments from Email" works. At the moment since we are using the built in system any received email that has no subject cause the service to fail with the message "Issue must have a summary. The mail message has an empty or no subject.". Every time this happens we have to process the email manually.

Do you know of any way around this?

EDIT

The emails are being sent by customers, so I can't enforce all of them to send a subject.

The problem is that the mail creation service won't process the email once it has no subject.. so setting default value won't help. The only way i can think of is rewriting the mail service. Does anyone knows how could i do that? i I found the original source code here, but not sure how to build and deploy it.

Anyway can think of any other way?

Thanks!!

like image 873
Kuf Avatar asked Jan 26 '26 01:01

Kuf


1 Answers

I assume that you just added some service to Jira in admin interface which automatically serializes emails.

If you want to fully customize the default behaviour, you can write your own simple jira plugin. See the Atlassian pages:

https://developer.atlassian.com/display/DOCS/Set+up+the+Atlassian+Plugin+SDK+and+Build+a+Project

https://developer.atlassian.com/display/JIRADEV/Component+Plugin+Module

Your atlassian-plugin.xml should include something like:

<component key="message-handler-factory" class="com.atlassian.jira.plugins.mail.internal.DefaultMessageHandlerFactory" public="true">
    <interface>com.atlassian.jira.service.util.handler.MessageHandlerFactory</interface>
</component>

You can for example extend the CreateOrCommentHandler class.

like image 61
Peter Csiba Avatar answered Jan 28 '26 12:01

Peter Csiba