Issue Summary
Insight post function to create an Insight Object from a Jira Issue does not set date time value correctly if Jira is using non-default date time picker format.
In a newer version Jira 8.20.1 (Insight 9.1.3), objects are not being created due to a "Validation errors"
Steps to Reproduce
- Create a Jira custom field with Date Time Picker type.
- Create an Insight post function - Create an Insight Object from a Jira Issue. Configure the
post function to set the Jira custom field from step 1.
- Add an attribute to the object type with DateTime type value.
- Configure Jira date time format as follows.
- Administration > System > General configuration > Advanced settings
- Administration > System > Look and feel
- Create an issue and pick a date time value for the custom field created in step 1. This is how it looks like in the Jira issue view.
- Transition the issue so that a new object will be created.
- Check the object created from the transition and check the date time value.
Expected Results
The date time value is set correctly as expected
Actual Results
- The date time format of the object does not respect Jira's date time settings
- The date time value is not set correctly
In a newer version Jira 8.20.1 (Insight 9.1.3), objects are not being created due to a "Validation errors"
2021-11-17 10:49:49,786+0000 http-nio-8080-exec-9 ERROR admin 649x4572x1 11prhdq 0:0:0:0:0:0:0:1 /secure/QuickCreateIssue.jspa [c.r.j.p.i.s.j.workflow.postfunction.InsightWorkflowFunctionCreateObjectFromIssue] Failed to create object from Issue: IPF-6
com.riadalabs.jira.plugins.insight.common.exception.ValidationInsightException: ValidationInsightException: Validation errors were found: rlabs-insight-attribute-700: ErrorMessage{i18nKey='rlabs.insight.i18n.constraint.violation.DateTime.range', parameters=[0017/Nov/19 11:08, 1753/Jan/1], additionalMessage=null};
at com.riadalabs.jira.plugins.insight.services.validation.ValidateObjectImpl.validateObjectBean(ValidateObjectImpl.java:216)
at com.riadalabs.jira.plugins.insight.services.core.ObjectServiceImpl.storeObject(ObjectServiceImpl.java:382)
at com.riadalabs.jira.plugins.insight.services.core.ObjectServiceImpl.storeObject(ObjectServiceImpl.java:264)
at com.riadalabs.jira.plugins.insight.services.jira.workflow.postfunction.InsightWorkflowFunctionCreateObjectFromIssue.execute(InsightWorkflowFunctionCreateObjectFromIssue.java:144)
at com.riadalabs.jira.plugins.insight.services.jira.workflow.InsightWorkflowFunction.execute(InsightWorkflowFunction.java:1016)
Workaround
Use the default date/time and picker format
Note
Original bug - https://jira.mindville.com/browse/ICS-1679