Insight - Create a parent-child hierarchy

Still need help?

The Atlassian Community is here for you.

Ask the community

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

Note that this KB was created for the Data Center version of the product. Data Center KBs 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

Purpose

If you want to create a hierarchy of object Types in Insight - Asset Management, you may be interested in using Object Type Inheritance.

This is useful if you need to create multiple object types, nested in one another following a path from the top Level to the lower or the other way around. Using hierarchy of object Types in Insight, allows you to have a reference from Child to its highest level, like nested references.


You won't be able to set the inheritance for an already existing structure of object types. You can only do it when creating a parent, and then child object types.

Example

You may want to implement something similar like the following schema structure:

Goal

A user selects "AA IN" object value and the values provided for Object Type 'DD IN' should be shown based on the selection for 'AA IN'.

A solution would be to have an Outbound reference from Object Type 'DD IN to Object Type 'AA IN', but how about if you do not want to have a second reference attribute in D to A? Then, you can use Object Type Inheritance. 

Step-by-step

All object types and attributes names were chosen at random

  1. Create Object Type "AA IN"
  2. Enable Inheritance by setting Let the attributes be inherited by object type children
  3. Create Child Object Type "BB IN" , Object Type "CC IN" and Child Object Type "DD IN"
  4. On Object Type B, add an attribute called "AA Parent" and Type Object with reference to "AA IN" Object Type
    1. Note: You can create the new reference types on the fly, by typing them in the "Additional Value" field. In the above image, the new one 'BB-AA' is created when you type it in the Additional value field and select 'BB-AA (New Reference)'.
  5. On Object Type C, add an attribute called "BB Parent" Type Object with reference to "BB IN" Object Type
    1. Note: "AA Parent" attribute is inherited from previous Object Type BB
  6. On Object Type D, add an attribute called "CC Parent" Type Object with reference to "CC IN IN" Object Type
    1. Note: "AA Parent" and "BB Parent" attributes are inherited from previous Objects Types 
  7. Create new objects. Example of some data:
  8. Create two Insight Custom fields
    1. 'AA': customfield_11002 which contains Object from "AA IN"
      1. Filter Scope (IQL): objectType="AA IN"
      2. Filter Issue Scope (IQL): "Not configured"
    2. 'DD' which values will depend on the selection for AA custom field
      1. Filter Scope (IQL): objectType="DD IN"
      2. Filter Issue Scope (IQL): object HAVING outboundReferences(Key = ${customfield_11002})

Result

  • If object aa1 is selected, only 'dd1' should be displayed.

  • If object aa2 is selected, only 'dd2' should be displayed.


Last modified on Nov 3, 2022

Was this helpful?

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