JETI Plugin not parsing Date on incoming E-Mails

Christian Schlaefcke
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 10, 2018

Hi,

I try to initialize a date time custom field using incoming mail feature of the Email this Issue plugin. It works perfectly with a plain text field but when I try to fetch (regex) and set the date time value I get this error / exception:

Date parsing failed: java.text.ParseException: Unparseable date: "30.10.2018 20:49:45"

I already tried to set the date time formats in the Admin Look & Feel section and also in the advanced settings but that does not seem to fix my problem.

I also found this article in the Meta-Inf documentation but this unfortunately only addresses outgoing email templates :-(

Any hint pointing me to the right direction would be very much appreciated!

Best Regards,

Christian

P.S. I hope I am not ending with over-complicated regex substitutions just to make sure the correct format will be passed to jeti incoming mail handler :-(

1 answer

1 accepted

0 votes
Answer accepted
Alexandra Terek December 12, 2018

Dear Christian,

The issue was with the field rules settings, the regex needed some minor changes and the Use Value had to be set properly.
As per our Documentation:

"If you want to set Date or DateTime picker fields, date or date time values from the email must be parsed. Email This Issue provides an object that supports date parsing. [...]The date or date time pattern follows the syntax in Java SimpleDateFormat."

In this case the object had to be set to:
$parser.parseDate("dd.MM.yyyy HH:mm:ss", $!group1.trim())

While the correct regex is as follows:
(?s)Datum/Uhrzeit\:\s*(.*)

If you have the field rule set up as above, it should present you with the desired format.

Hope this was helpful, let me know if I can further assist.

Cheers,
Alexandra
META-INF Team

Christian Schlaefcke
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 12, 2018

Hi Alexandra,

thank you for your hint and the direction to the correct documentation. 

Now it works!

Best Regards,

Christian

Alexandra Terek December 12, 2018

Dear Christian,

You're more than welcome!

Have a nice day,
Alexandra

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events