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

When accessing the Assets object schema the atlassian-jira.log is filled with UnrecognizedPropertyException warnings

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 5.16.0
    • 5.10.0, 5.11.0, 5.12.0, 5.12.4, 5.12.5
    • Assets - Import

      Issue Summary

      This is reproducible on Data Center: yes

      When accessing the Assets object schema the atlassian-jira.log is filled with several UnrecognizedPropertyException warning messages related to the "duplicateEnries" field:

      /rest/insight/1.0/import/inflightorlatestresults/ot/226 [c.r.j.p.i.s.c.dal.impl.ProgressDalImpl] Unable to parse result {"id":null,"objectTypeName":"CSV","objectTypeId":223,"objectsUpdated":96,"objectsCreated":2,"objectsIdentical":2197,"objectsMissingUpdated":0,"objectsMissingDeleted":0,"entriesInSource":2295,"duplicateEnries":0,"emptyLabelEntries":0,"emptyExternalIdEntries":0,"objectsFilteredWithIQL":0,"errorMessages":null,"readExternalDataTimeInMs":2384,"mapExternalDataTimeInMs":0,"iqlFilteringTimeInMs":0,"decidingActionsTimeInMs":233,"writeInsightDataTimeInMs":3109,"postFunctionTimeInMs":1,"executionTimeInMs":5727,"objectsWithUpdatedReferences":98}
      com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "duplicateEnries" (class com.riadalabs.jira.plugins.insight.services.imports.common.ObjectTypeResult)
      

      When updating Jira Service Management to the latest versions, we see that the "Duplicate objects based on the external id" field have a value of "undefined".


      The issue seems to be related to the "duplicateEnries" field which should actually be called "duplicateEntries".  

      The issue seems to have been introduced in Jira Service Management 5.10.

      Steps to Reproduce

      To reproduce the issue, we need to first create an import history (Process Result data) in a version where the problem is not present.

      1. Install Jira Service Management 5.9.x or below
      2. Create a new Object Schema (Assets > Object Schemas > Create Object Schema)
      3. Perform a test import (It could be any type of import. e.g CSV import)
      4. Upgrade to Jira Service Management 5.10.x+
      5. Access the Object Schema
      6. Verify the atlassian-jira.log

      Expected Results

      There are no warning messages in atlassian-jira.log and the "Duplicate objects based on the external id" field has a value:

      Actual Results

      The below exception is thrown in the atlassian-jira.log file when accessing an object schema:

      com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "duplicateEnries" (class com.riadalabs.jira.plugins.insight.services.imports.common.ObjectTypeResult)
      
      Video reproducing the issue: UnrecognizedPropertyException_reproducing_the_issue.mov

      Workaround

      One possible solution to address the WARN messages appearing in the atlassian-jira.log is to clean the history of previous imports from all object schemas. This can be done by removing the data from the Process Results page within the object schema configuration. By doing so, the historical data from the Process Result page in all schemas will be cleared, including the results from previous versions where the duplicateEntries field was used.

      Always back up your data before performing any modification to the database. If possible, try your modifications on a test server.

      1. Stop Jira
      2. Perform the DELETE in the following tables: 
        delete from "AO_8542F1_IFJ_PRG_RES";
        
        delete from "AO_8542F1_IFJ_PRG_OT_RES";
        
      3. Start Jira 

      The WARN message will no longer appear for new imports, however, the "Duplicate objects based on the external id" field will still be showing as "undefined".

        1. image-2024-04-02-09-10-09-877.png
          376 kB
          Rodrigo Jose Zaparoli
        2. image-2024-04-02-10-33-58-112.png
          138 kB
          Rodrigo Jose Zaparoli
        3. UnrecognizedPropertyException_reproducing_the_issue.mov
          37.95 MB
          Rodrigo Jose Zaparoli

              c8bcca445054 Benjamin Suess
              7d74d3b1a350 Rodrigo Jose Zaparoli
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: