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 :-(
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
Hi Alexandra,
thank you for your hint and the direction to the correct documentation.
Now it works!
Best Regards,
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Christian,
You're more than welcome!
Have a nice day,
Alexandra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.