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

An Empty Date Field Caused an NPE in the Clone Action in Automation (A4J) Rule

      Issue Summary

      The presence of the field Due Date in a project's screens causes a null pointer exception in a clone action automation involving an Assets field copying a value from the trigger issue.

      Steps to Reproduce

      1. Create a sample object schema and a few objects.
      2. Create a sample project.
      3. Create an Assets object custom field, associate it with the object schema and add it to the project.
      4. In the screens for the project, add the field Due Date.
      5. In the project, create an automation rule:
        • When: Manually triggered
        • Then: Clone issue into (Same project, same issue type, Assets field "Copy Assets Field from Trigger issue")
        • Name it something like "Assets Clone Issue".
      6. Create a new issue in the project and add an object to the Assets field.
      7. Click on More > Assets Clone Issue. A message will state the rule was executed successfully.
      8. Go to the automation audit logs and check that the rule failed with the following error:
        • Unexpected error executing rule:
          java.lang.NullPointerException
          
      9. Now, remove the Due Date field from the project screens.
      10. Try the clone action again. It will work.

      Recent reports indicate that, similar to the 'Due Date' field, any field primarily a date type that remains empty can result in a Null Pointer Exception (NPE) error. This occurs when using the clone/create option, which involves an operation to copy the values of Asset fields within the Automation rule (A4J).

      Expected Results

      The issue is cloned successfully.

      Actual Results

      The automation rule fails.

      Workaround

      If only the Due Date or any other removable field is involved, it could be removed from the issue view. However, if the situation involves essential custom fields that must be copied, it is advisable to implement an IF condition in the rule to verify the value of these specific fields for the time being.

            [JSDSERVER-16116] An Empty Date Field Caused an NPE in the Clone Action in Automation (A4J) Rule

            There are no comments yet on this issue.

              ccb6682f8bff Yang Qian
              braymundo Bruno Raymundo
              Affected customers:
              2 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: