Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×I'm attempting to initialize the due date field from the body of an email. I've got the following set up:
1. In the handler, "Initialize Issue Fields" is checked.
2. In the "Fields" section, Goal of Rule is set to "Set fields in NEW issues..."
3. My regular expression: (?i)(?<=due date:)\s*((0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.](19|20))\d\d is working in the JETI regex tester. For example, "due date: 02/21/2018" would extract "02/21/2018".
4. I've tried both matching in the email body, and grabbing capture group 1, and setting manually using $parser.parseDate("MM/dd/yyyy", $group1).
5. And lastly, my issue field is "Due Date".
What am I missing? Thanks in advance.
Hi Doug!
Have you tried this?
"How to initialize Date and DateTime picker fields
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.
E.g. say your regexp returns the date string in the first capture group: 23/07/2015. Then set the Use Value From attribute to Manual and enter $parser.parseDate("dd/MM/yyyy", $group1).
The date or date time pattern follows the syntax in Java SimpleDateFormat."
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.