Assets objects cannot be moved

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。

*Fisheye および Crucible は除く

 

要約

Objects within Assets cannot be moved between Object Types, and no error message is displayed on the Jira UI. 

The following appears in the atlassian-jira.log:

2023-11-03 10:08:03,524+0000 insight-InsightMoveThreadGroup-worker-thread-6 ERROR xxx 608x1579x1 11uux5v 0.0.0.0 /rest/insight/1.0/move/objects [c.r.j.p.i.s.core.impl.MoveServiceImpl] Unable to move object (from: com.riadalabs.jira.plugins.insight.services.model.LegacyObjectBean@50e935e7[objectAttributeBeans=[AttributeWithSingleValue(identifier=6658831, objAttributeTypeId=756, enclosingObjectId=430533, attributeValue=StringValue(value=TEST-123)), AttributeWithSingleValue(identifier=6658834, objAttributeTypeId=757, enclosingObjectId=430533, attributeValue=StringValue(value=lolo-ca-01)), AttributeWithSingleValue(identifier=6658832, objAttributeTypeId=758, enclosingObjectId=430533, attributeValue=DateValue(dateAsLong=1562164118467)), AttributeWithSingleValue(identifier=6658833, objAttributeTypeId=759, enclosingObjectId=430533, attributeValue=DateValue(dateAsLong=1562164118467)), AttributeWithSingleValue(identifier=6658827, objAttributeTypeId=760, enclosingObjectId=430533, attributeValue=StringValue(value=0.0.0.0.)), AttributeWithSingleValue(identifier=6658828, objAttributeTypeId=761, enclosingObjectId=430533, attributeValue=StringValue(value=FGL17024168)), AttributeWithSingleValue(identifier=6658829, objAttributeTypeId=762, enclosingObjectId=430533, attributeValue=StringValue(value=LOL5515)), AttributeWithSingleValue(identifier=6658830, objAttributeTypeId=888, enclosingObjectId=430533, attributeValue=StringValue(value=Firewall))],id=430533,label=lolo-ca-01,objectKey=TEST-123,created=Wed Jul 03 14:28:38 UTC 2019,updated=Wed Jul 03 14:28:38 UTC 2019,hasAvatar=false,objectTypeId=278], to: com.riadalabs.jira.plugins.insight.services.model.MutableObjectBean@1d854f0e[id=430533,label=lolo-ca-01,objectKey=TEST-123,created=Wed Jul 03 14:28:38 UTC 2019,updated=Wed Jul 03 14:28:38 UTC 2019,hasAvatar=false,objectTypeId=748,objectAttributeBeans=[ObjectAttributeBean [objectTypeAttributeId=756, objectId=430533], ObjectAttributeBean [objectTypeAttributeId=757, objectId=430533], ObjectAttributeBean [objectTypeAttributeId=758, objectId=430533], ObjectAttributeBean [objectTypeAttributeId=759, objectId=430533], ObjectAttributeBean [objectTypeAttributeId=760, objectId=430533], ObjectAttributeBean [objectTypeAttributeId=761, objectId=430533], ObjectAttributeBean [objectTypeAttributeId=762, objectId=430533], ObjectAttributeBean [objectTypeAttributeId=888, objectId=430533]]]) make sure to validate this object or restore from backup
com.riadalabs.jira.plugins.insight.common.exception.DataInconsistencyInsightException: DataInconsistencyInsightException: Unable to move object with id TEST-123. Object may be inconsistent contact your administrator; nested exception is: There was a SQL exception thrown by the Active Objects library:
Database:
	- name:PostgreSQL
	- version:14.9
	- minor version:9
	- major version:14
Driver:
	- name:PostgreSQL JDBC Driver
	- version:42.2.25
org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "pk_AO_8542F1_IFJ_OBJ_ATTR_ID"
  Detail: Key ("ID")=(23356021) already exists. 

環境

  • Versions Supported for Assets/Insight.
  • JIRA is connected to a PostgreSQL database. This knowledge base article is not applicable to other databases. 

診断

To diagnose this problem:

  1. AO_8542F1_IFJ_OBJ_ATTR.ID column is controlled by the sequence called AO_8542F1_IFJ_OBJ_ATTR_ID_seq. Executing the following queries in the Jira database should yield the next attribute ID and the last ID that was utilized.

    1. If the first value is higher than the second value, the sequence is out of sync. 

      select max("ID") from "AO_8542F1_IFJ_OBJ_ATTR";
      SELECT NEXTVAL('"AO_8542F1_IFJ_OBJ_ATTR_ID_seq"')
  2. Verify whatever AO_8542F1_IFJ_OBJ_ATTR table uses "AO_8542F1_IFJ_OBJ_ATTR_ID_seq" sequence.

    1.  Run the following query in your Jira database.

      SELECT table_name, column_name, column_default FROM information_schema.columns WHERE table_name like 'AO_8542F1_IFJ_OBJ_ATTR';
    2. Expected results.
      AO_8542F1_IFJ_OBJ_ATTR_ID_seq should be displayed within column_default.

      table_name

      column_name

      column_default

      AO_8542F1_IFJ_OBJ_ATTR

      ID

      nextval('"AO_8542F1_IFJ_OBJ_ATTR_ID_seq"'::regclass)

      AO_8542F1_IFJ_OBJ_ATTR

      OBJECT_ID


      AO_8542F1_IFJ_OBJ_ATTR

      OBJECT_TYPE_ATTRIBUTE_ID


      AO_8542F1_IFJ_OBJ_ATTR

      UPDATED


原因

This is caused by broken Active Object table sequences. The origin of this problem is still unidentified, but it could be caused from the improper manual merging of objects between two Jira instances.

ソリューション

There are two different solutions, depending whether the sequence is out of sync (Solution #1) or whether AO_8542F1_IFJ_OBJ_ATTR table uses another sequence. ( Solution #2)

Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

Solution #1 

  1. Jira を停止します。
  2. You can dynamically fix the sequence for affected table with the following SQL query:
    SELECT setval('"AO_8542F1_IFJ_OBJ_ATTR_ID_seq"', (SELECT Max("ID") FROM "AO_8542F1_IFJ_OBJ_ATTR") +1 );

  3. Jira の起動

Solution #2

  • It could be possible to alter the sequence associated with a column. it would be to change the sequence used by the "ID" column in the table "AO_8542F1_IFJ_OBJ_ATTR" to "AO_8542F1_IFJ_OBJ_ATTR_ID_seq.".
  • However, If the table has an incorrect sequence, it could be indicative of a more significant underlying issue.  Kindly contact our Atlassian support team for further assistance.


最終更新日 2025 年 5 月 19 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.