Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Assets read-only custom field configuration (Insight)

Rebecca
Contributor
February 21, 2023

Hello,

it's the first time I am working with Assets read-only fields and I am completely lost on the configuration (even after reading thought the documentation).

I have the following case:

4 Levels with objects that are referring to each other. So for example one object in RCSM-Lrvel 3 refers to exactly 1 object in RCSM-level 2 which refers to one object in RCSM-Level 1. However an object in RCSM-Level 1 may be a property of several other objects in RCSM-Level 2.

How do I need to configure the readonly Insight (Assets) custom field?

Target state: the Jira user selects the RCSM-Level 3 from an Insight field --> and the two read-only fields for Level 2 and 1 are then automatically filled with the according values from RCSM-Level 2 and RCSM-Level 1.

  • RCSM-Level 3 has this attribute: RCSM-Level 2 --> object: RCSM-Level 2
  • RCSM-Level 2 has this attribute: RCSM-Level 1 --> object: RCSM-Level 1

Best regards
Rebecca

2023-02-21 v2.png2023-02-21 v1.png

1 answer

1 accepted

1 vote
Answer accepted
PD Sheehan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 21, 2023

You haven't specified the names of your custom fields. So I'll use just "Level3", "Level2" and "Level1" to contrast from the attribute names of RSCM-Level n.

I know the obvious direction is to use an IQL like the following (or some variation):

objectType="RSCM-Level2" and Key = ${Level3}."RSCM-Level 2".Key

But I found that the ${fieldname} never returns a useful object that can be drilled into. Assume the placeholder represents a simple string representing the Key of the selected object.

So, if you're looking for a level 2 and level 1 objects based on the level3 selection, you have to work in reverse order and use the "inboundReference()" function -- can be abbreviated to inR().

Try something like this:

Level2:

  • Filter Scope: objectType="RCSM-Level 2"
  • Filter Assign Scope: object having inboundReference(key=${Level3}, refType="RCSM-Level 2")

Level1:

  • Filter Scope: objectType="RCSM-Level 1"
  • Filter Assign Scope: object having inboundReference(object having inboundReference(key=${Level3}, refType="RCSM-Level 2"), refType="RCSM-Level 1")

Keep in mind that you can't see "read-only" custom fields in create/edit screens and those values are populated via internal event listeners.

For that reason, if you have a transition where you prompt for a field that is used as the filter assign scope for a read-only insight field, make sure that transition fires an "Issue Updated" event in the post functions. If it only fired "Generic Event", then the Insight read-only fields will not be populated.

Another note, if you're trying to keep the number of custom fields to a minimum, it is possible to achieve the same thing with regular insight object fields. Perhaps you can find a way to use field names that are generic enough such that they could be reused in other contexts. Some contexts can have the field populated automatically using the "assign scope" and others can be completely editable by the users.

Suggest an answer

Log in or Sign up to answer