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.
您对此有任何了解吗?
编辑
电子邮件是由客户发送的,因此我无法强制所有电子邮件发送主题.
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.
还有其他办法吗?
谢谢!
我假设您刚刚在管理界面中向Jira添加了一些服务,该服务会自动对电子邮件进行序列化.
I assume that you just added some service to Jira in admin interface which automatically serializes emails.
如果要完全自定义默认行为,则可以编写自己的简单jira插件. 请参阅Atlassian页面:
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+插件+模块
您的atlassian-plugin.xml应该包含以下内容:
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>
例如,您可以扩展CreateOrCommentHandler类.
You can for example extend the CreateOrCommentHandler class.