JIRA 4.4.4 : Have Issue with forwarding emails to another project in JIRA having project key in subject

wajdhaikal
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 27, 2013

I have this behaviour how can I workarround this,

I have project A with key A

I have project B with key B

Users of project A forward a copy of thier ticket in thier project to project B having project A key in the subject the email will not create ticket in project B.

Can we write a script or listiner to replace any exsising project Key from the subject of email and foce the email to go to the intended recipient project ??

Regards,

2 answers

0 votes
wajdhaikal
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 1, 2013

If reciepient email in project B is defined for that project in subject (looking at project Key in subject) match then its a comment, if no match then it will be a new issue to be created in the reciepient email project, simply as that!

Please I have the source code , if we can re-code the class , where is that class?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 1, 2013

That rule does not work. You'll match all incoming email to "new issue". In the cases where it contains a project key in the subject, then what does it comment on? You need to include the *full* issue key to get a comment. In other words, pretty much what the default email handlers do, although you probably want to remove the bit that matches other projects.

I can not give you the source code, it's private. If you have a commercial license for Jira, you can download it from your my.atlassian account.

However, whether you have the code or not, start at: https://developer.atlassian.com/display/JIRADEV/Adding+your+own+email+handling+classes

wajdhaikal
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 4, 2013

There should be a workarround for such case, keeping inmind that the subject contains full issue number and project key like ( A-1125 ), what is not logical is its looking at the subject and does not look at the To field as well. This way it will not open a new ticket in project B while the recipeint is B project.

Please our managers says why its not opening tickets in the requersted project B while the subject contains (FW: blabla A-1125)

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 27, 2013

All the built-in handlers work on the same simple rule - if there's an existing issue key in the subject, then the email is a comment on that issue. If it can't find an existing key, it will create a new issue in the handler's defined project.

Your only option is to find or write a new handler for your email, because you need totally different rules (When I say "find", I'm actually hinting that you might want to look at the JEMH, although I don't know if it can do this)

I think you might have a logical problem though - if an email from a project A user arrives with an issue key in the subject, then how do you know whether it's a comment for that issue or a new issue for B?

Suggest an answer

Log in or Sign up to answer