Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to reference attribute data from a selected object in a form

Arnold Rolle May 7, 2024

Hi,

I am making a form which references an Object Schema of equipment with the attributes name, available, unavailable and total. I have 4 custom fields for accessing this data.

The first custom field populates the initial item selection dropdown list in the form. I would like the other 3 custom fields to automatically populate with the related attribute values for the selected object.

The first custom field works as intended, but I can't seem to reference the attributes of the selected object properly. I am most likely using the wrong AQL for this. 

I've tried filtering the issue scope using Object HAVING inboundReferences(Name=${customfield_xxxx.label}) and selecting the attribute I would like to populate the form dropdown lists in the User interaction section of the Asset Objects field configuration for the custom field. This populates the second dropdown with the same list of objects in the first dropdown instead of the attribute.

Form

checkout.png

Example of an object in the Test Schema

schema.png

Custom Field for number 2 (3 and 4 will be set up to search for their respective attributes.)

customfield.png

 

 

 

1 answer

1 accepted

0 votes
Answer accepted
Vijay Dadi
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.
May 19, 2024

@Arnold Rolle ,

From what I understood, native Jira doesn't have the functionality to populate the values of proceeding fields upon selection of current field. Correct if I am wrong.

I believe there might be some apps on the marketplace but I was expecting this bare minimum functionality with native Jira.

Happy to know more on this item.

Vijay

Arnold Rolle May 20, 2024

Thanks for the info, Vijay. I'll look into some marketplace apps.

Maximillian Tjhi August 7, 2024

@Arnold Rolle Was wondering if you found a solution to this. Thanks!

Arnold Rolle August 7, 2024

@Maximillian Tjhi 

You should be able to have a custom field show an objects attributes automatically on a form, but for some reason it does not work properly and will not automatically display the data upon selecting the device. This was the only work around I found to make it automatically populate upon selections.

If you want the data to show up automatically in the current version of JSM cloud, you will need to make an object type for each attribute and reference the main object.

For instance, I had Devices as my main object and wanted the attributes available, unavailable and total. I created those attributes as objects of their own and added a device attribute to them as an outbound reference. 

On the form there were custom fields created for the device and each attribute.

 

Example of the Available custom field:
Filter scope (AQL)
objectType = Available
Filter issue scope (AQL)
Devices = ${customfield_[customfield_ID}}
(This custom field ID was the selected device on my form. It is looking in the available object for items with that outbound reference)

Display and search across these attributes in the custom field*
Name
Display these attributes in the issue view
Name
(Set these to automatically show the Name attribute of the available object)

 

Maximillian Tjhi August 7, 2024

Thank you millions for your reply. I'll attempt to implement - really appreciate the help!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events