Assets in Jira Service Management Data Center: Objects are not marked as missing by the import due to null or different import source


Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

In the object type mapping in an import configuration, we can choose what to do if an Assets object that exist in the schema but missing in the data source. However, some objects are not getting updated or deleted even though it has been configured so, while other objects are getting the updates or removed by the same import source.


Environment

JSM 5.7.0 and above

Diagnosis

  • This may affect only some of the objects instead of all objects of the same import source.
  • In the insight_import.log, message below can be seen during the sync that should update or delete the missing object.

    Existing objects that are not part of the import source will be marked as missing only if they have ever been created or updated from that import source.
  • The object that should have been treated as a missing object by the import has a different or no import source ID in the database. For example, the ID of the import that should mark the object missing is 1 but the object has an import source ID of 2.
    • The SQL query below can be used to check the import source ID of an object. You can retrieve the object's ID following the steps in Assets (formerly Insight): How to get the IDs of object schema, object type and object from the Jira User Interface and replace id in the query below.

      select * from "AO_8542F1_IFJ_OBJ_HIST" where "OBJECT_ID" = 'id'
    • Example result showing an object with ID = 1 has no import source ID (IMPORT_SOURCE_ID is null). It was created on an instance before JSM 5.7.0 (INSIGHT_VERSION < 10.7).

      ACTOR_USER_KEY|AFFECTED_ATTRIBUTE      |CREATED                |ID  |INSIGHT_VERSION|NEW_KEY_VALUES                                                            |NEW_VALUE                                  |OBJECT_ID|OBJECT_TYPE_ATTRIBUTE_ID|OLD_KEY_VALUES                                                                                |OLD_VALUE                                  |TYPE|IMPORT_SOURCE_ID|
      --------------+------------------------+-----------------------+----+---------------+--------------------------------------------------------------------------+-------------------------------------------+---------+------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------+----+----------------+
      JIRAUSER10000 |                        |2024-06-24 12:30:15.104|   1|9.1.2          |                                                                          |                                           |        1|                        |                                                                                              |                                           |   0|                |
      JIRAUSER10000 |ID                      |2024-06-24 12:30:15.159|  15|9.1.2          |{"values":[{"textValue":"ECC-1"}]}                                        |ECC-1                                      |        1|                      96|                                                                                              |                                           |   1|                |
      JIRAUSER10000 |Server                  |2024-06-24 12:30:15.918| 313|9.1.2          |{"values":[{"referencedObjectBeanId":99}]}                                |oracledb-11g-prod                          |        1|                      97|                                                                                              |                                           |   4|                |
    • Example result of an object created via import (IMPORT_SOURCE_ID = 2) after JSM 5.7.0 (with INSIGHT_VERSION > 10.7).

      ACTOR_USER_KEY|AFFECTED_ATTRIBUTE      |CREATED                |ID  |INSIGHT_VERSION|NEW_KEY_VALUES                                                            |NEW_VALUE                                  |OBJECT_ID|OBJECT_TYPE_ATTRIBUTE_ID|OLD_KEY_VALUES                                                                                |OLD_VALUE                                  |TYPE|IMPORT_SOURCE_ID|
      --------------+------------------------+-----------------------+----+---------------+--------------------------------------------------------------------------+-------------------------------------------+---------+------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------+----+----------------+
      JIRAUSER10000 |                        |2024-10-22 09:42:28.817|1039|15.17.3-QR-0029|                                                                          |                                           |      341|                        |                                                                                              |                                           |   0|               2|
      JIRAUSER10000 |Operating System        |2024-10-22 09:42:30.077|1146|15.17.3-QR-0029|{"values":[{"referencedObjectBeanId":397}]}                               |Windows Server 2019 Standard               |      341|                     559|                                                                                              |                                           |   4|               2|
      JIRAUSER10000 |IP Address              |2024-10-22 09:42:30.077|1149|15.17.3-QR-0029|{"values":[{"referencedObjectBeanId":449}]}                               |192.168.208.10                             |      341|                     560|                                                                                              |                                           |   4|               2|



Cause

Since 5.7.0, the default behavior is to mark object missing only if they have ever been created or updated from that import. This comes from the bug fix for JSDSERVER-7225 Insight Missing Objects across all import configurations.

Whenever a synchronization happens, the import source ID will be checked against the object history and the object will be marked as missing only if that import source ID is part of the history. Objects that were created and updated since Assets versions before 5.7.0 have null import source ID and hence, these objects will not be marked as missing.



Solution

To go back to the previous behavior, add the feature flag below to <BASE_URL>/secure/admin/SiteDarkFeatures!default.jspa. This is the page where dark features are managed as described in How to manage dark features in Jira Server and Data Center.

insight.import.update.missing.object.only.if.ever.imported.disabled

The feature flag above disables the feature which checks the import source ID against the object history. Having said that, objects will be marked missing regardless of their import source.


Last modified on Oct 31, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.