Forums

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

Creating a custom field to select Object type

Vesaro September 19, 2023

brave_screenshot_vesaro.atlassian.net.png

Hi,

I'm just trailing Jira to create a helpdesk and also an Asset system. 

I'm trying to create a custom field for a form which would allow users to return a part to us.

I want a dropdown which will list the Object type rather than an object itself. In my case I would like to filter PC parts and then for them to be able to select whether its ram, gpu, psu etc and then the next field would show only the objects within that type. 

Have tried lots of different combos of AQL but cant seem to find how to do it - Any advice? I'm very new to this so as well have included a rough draft of what my tree looks like. I could well be thinking about this the wrong way. 
Thanks 
Dave 

1 answer

1 accepted

1 vote
Answer accepted
Krister Broman _Advania_
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.
September 19, 2023

I would probably create a new object type called "Part Type" then assign that as a reference to parts that way you would be able to select the part type first, then use that data as a reference in the second lookup.

Lets say that Part Type has objecttypeid 777

For your parts you would create a reference to Part Type.

First field - Part Type
Field ID: 10999
Lookup: Filter scope (AQL): objectTypeId = 777

Second field - Part

Filter scope (AQL): objectTypeID in(333,444,555 etc)
Filter issue scope (AQL): object HAVING outboundReferences("Name" = ${customfield_10999.label})

It does not really need to be a reference within assets, you could have data from a choice field i believe, however connecting the data with assets secures any future changes you may do.

Vesaro September 19, 2023

Hi thanks for the answer.

I'm still struggling. 

I have set an attribute on the "parts" Object type and selected "parts" as a reference - and then this is inherited to all the children. 

When i run the form the field just comes up as blank.... 

references.pngIs this what you meant. Apologies, feel like i'm fumbling around in the dark a bit here.  

Dave

Vesaro September 19, 2023

field.png

This is how ive got the custom field set up. Am i at least in the right ballpark? haha Tricky for a newbie. Lots to learn

Krister Broman _Advania_
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.
September 21, 2023

What you are doing now looks to be that you have created a reference to parts so basically if you had a specific Wheel Rim then you could reference that to a specific Wheel Base so you could easily find matching equipment. So not what you were asking for.  

Create a new objectype that is called "Part Type" it only needs to have a name as attribute at this time but you could build upon it later on. 

In Part Type create an object for each part type, i.e. Wheel Base, Wheel Rim etc. 

In your original objecttypes for Parts then add the new reference to "Part Type" and set Part Type to all objects. 

Again you could do this by choices that you assign in the attributes, but usually i find its better to do it this way as you often tend to expand the functions later on. For example you would be able to drill down on options using multiple fields. I created a quick example. 

image.png

Like Vesaro likes this
Vesaro September 21, 2023

This is excellent,
I had pretty much just come to this conclusion myself after wrestling with it for a few days. 

Thanks for clarifying. Nice to know im going in the right direction now. 

Suggest an answer

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

Atlassian Community Events