Uploaded image for project: 'Jira Service Management Cloud'
  1. Jira Service Management Cloud
  2. JSDCLOUD-10987

Using placeholder to extract specific value in data locator list in Insight import IQL does not always work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Low Low
    • Assets - Import
    • None

      Issue Summary

      In an import in Insight, you can import multiple referenced objects into an attribute. You can do this using a placeholder in the IQL like "Label IN (${Locator${0}})" where Locator is replaced by the name of the Locator.

      If your Locator value has multiple values (e.g. in a CSV file that column contains "Value A || Value B || Value C") you can select just the nth value using "Label IN (${Locator${n}})".

      However, if one of your rows contains only one value, using "Label IN (${Locator${1}})" won't return any value (where it should return the same as "Label IN (${Locator${0}})".

      See https://support.atlassian.com/jira-service-management-cloud/docs/create-attributes-and-references-from-your-data/ and
      https://support.atlassian.com/jira-service-management-cloud/docs/use-placeholders-to-replace-information-depending-on-context/ for more information.

      Steps to Reproduce

      1. Create a schema with two object types, "Team" and "Member". Add an attribute to "Team" that references the "Member" object. Create three Member objects (MemberA, MemberB, MemberC)
      2. Create an import source with the CSV file attached
      3. Map the "Team" locator to the Name attribute
      4. Map the "Member" locator to the Member attribute
      5. Add the IQL "Label IN (${Member${1}})"
      6. Run the import

      Expected Results

      The first member in each row is added as an attribute value.

      Actual Results

      The first member is added from the row with multiple values.
      The row with a single value has nothing in the attribute.

      Workaround

      Add dummy value(s) after the ||.

        1. image-2023-07-20-15-41-33-321.png
          7 kB
          Yinon Negev
        2. team_member.csv
          0.1 kB
          Andrea

              8f5df932eda6 Dorothea Linneweber
              aolrich Andrea
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: