How to import multiple values on a new line in an Assets object attribute of type TextArea using JSON

お困りですか?

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

コミュニティに質問


プラットフォームについて: Cloud のみ - この記事は、 クラウド プラットフォームのアトラシアン製品にのみ適用されます。

要約

This article will explain the json format that needs to be used in order to import multiple values on a new line into an Asset Object attribute of type - TextArea.

環境

クラウド

シナリオ

The admin would like to import multiple values for a single attribute and display these values on a new line. However, the admin would like to perform this import using a json file rather than doing a conventional .csv file import.

For example, if you have an Asset object attribute named 'StreetAddress' and you would like to import multiple addresses for the same object and display them on separate lines. 

ソリューション

Part 1: Prepare your JSON file 

For example, if you have an object type = Manufacturer and object name = Dell. The object type has an attribute named 'StreetAddress' of type TextArea . Now, you would like to import the following addresses into this attribute and display them on a new line:

  • 20 Short Street
  • 40 Long Street

The JSON file format will be as follows(Add a \n  character for every new line):

{
  "Manufacturer": [
    {
      "Name": "Dell",
      "StreetAddress": "20 Short Street\n40 Long Street"
    }
  ]
}


The file extension will be in the format filename.json


Part 2: Create & Run import

  1. Create an attribute of type value 'TextArea' in the required object type.
  2. On the left hand menu, click on the 'Cog' icon next to Schema configuration 
  3. Click on the Import tab 
  4. Click on Create import 
  5. Select the import type as JSON Import as shown in the screenshot below and then click Next:
  6. Enter the required name and select the json file file to be imported.
  7. Edit the attributes mapping  as required.
  8. Click on Run import 


Once the import runs successfully, the values in the attribute will be displayed as follows:

For more details on Importing assets into JSM, please refer to the following support documentation:

For any further queries or troubleshooting issues, please feel free to reach out to our Support team.

最終更新日 2023 年 8 月 23 日

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

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