Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-7138

Insight post function to create an Insight Object from a Jira Issue does not set date time value correctly or object is not created if Jira is using non-default date time picker format

      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

      1. Create a Jira custom field with Date Time Picker type.
      2. 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.
      3. Add an attribute to the object type with DateTime type value.
      4. Configure Jira date time format as follows.
        • Administration > System > General configuration > Advanced settings
        • Administration > System > Look and feel
      5. 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.
      6. Transition the issue so that a new object will be created.
      7. 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

            [JSDSERVER-7138] Insight post function to create an Insight Object from a Jira Issue does not set date time value correctly or object is not created if Jira is using non-default date time picker format

            Suddha made changes -
            Link New: This issue relates to JSDSERVER-16025 [ JSDSERVER-16025 ]
            Satej Mirpagar made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Waiting for Release [ 12075 ] New: Closed [ 6 ]
            Benjamin Suess made changes -
            Fix Version/s New: 5.17.0 [ 107827 ]
            Benjamin Suess made changes -
            Status Original: In Progress [ 3 ] New: Waiting for Release [ 12075 ]
            Benjamin Suess made changes -
            Assignee New: Benjamin Suess [ c8bcca445054 ]
            Benjamin Suess made changes -
            Status Original: Short Term Backlog [ 12074 ] New: In Progress [ 3 ]
            Benjamin Suess made changes -
            Status Original: Long Term Backlog [ 12073 ] New: Short Term Backlog [ 12074 ]
            SET Analytics Bot made changes -
            UIS Original: 1 New: 3
            SET Analytics Bot made changes -
            UIS Original: 3 New: 1
            SET Analytics Bot made changes -
            UIS Original: 2 New: 3

              c8bcca445054 Benjamin Suess
              michin Michelle Chin
              Affected customers:
              6 This affects my team
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: