Email-Handler imports only first line

Achim Göttgens December 16, 2012

Hi,

we have a Problem with the Email-Handler "Create a new issue or add a comment to an existing issue". If Jira receives a mail - a valid Issue-Id noticed in subject - wich is sent by the customers HP-QC instance, it is only the first line imported as a comment.

I've found two alternative Content-Types (text/html and text/plain) in the Email-Source. I tried other Handlers with no or same effect.

Any ideas?

E-Mail-Bodies:

"------=_NextPart_...
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


Defect Benachrichtigung


_____ =20


Aufruf:..."

"------=_NextPart_...
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<html><head></head><body><TABLE width =3D 100%><TR><TD><H2>Defect Benachr=
ichtigung</H2></TD></TABLE><p><hr><p><b>Aufruf:</b>..."

2 answers

1 accepted

1 vote
Answer accepted
EddieW
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.
December 16, 2012

You say you are using the "Create a new issue or add a comment to an existing issue" handler, do you have the "strip quotes" checked?

Achim Göttgens December 17, 2012

Yes, "strip quotes" is enabled. My expectation is that only the lines that start with ">" are removed.
Is "_____ = 20" a termination criterion?

EddieW
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.
December 17, 2012

Not the full line, but I think 4 or more hyphens or line-scores is seen as a new line.

You can try disabling that to verify, but you would get all previous comments in a thread. You can also choose "

Add a comment before a specified marker or separator in the email body

and define your own regexp for the seperation (but I am not sure this will create new issues), or you can create a custom "Client ALM Handler"

https://developer.atlassian.com/display/JIRADEV/Plugin+Tutorial+-+Writing+a+Custom+Message+(Mail)+Handler+for+JIRA

Achim Göttgens December 18, 2012

I've disabled "strip quotes" now and the Mailhandler is working now.

Thank you!

0 votes
Andy Brook [Plugin People]
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.
December 17, 2012

Im pretty sure you see this because _____ is listed in JIRA_INST/atlassian-jira/WEB-INF/classes/outlook-email.translations, which identifies a range of default 'included' message delimiters. The solution here would be not not add that to your email, if you remove it, what happens?

Achim Göttgens December 17, 2012

The email format is set by the customer. Would it be a solution to modify the translation?

EddieW
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.
December 17, 2012

I would not modify except as a last resort, because you will need to repeat anytime you upgrade.

Andy Brook [Plugin People]
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.
December 17, 2012

? Just go and edit the file above, remove that line, should fix this for you (but obviously wont then match other email), if you need that for some email but not others, perhaps you need something more that the default handlers...

Suggest an answer

Log in or Sign up to answer