Missed Team ’24? Catch up on announcements here.

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

Filter available insight objects in Issue creation screen based on Request Type

alex bauer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 3, 2023

Hello everyone,

i'm setting up a JSM project and would like to use an Insight Object custom field, that is filtered based on the chosen Request type:

So i tried to configure the custom field like this: 


Filter Scope (IQL): objectType in objectTypeAndChildren("Insight ObjectType 1")

Filter Issue Scope (IQL): objectType in objectTypeAndChildren(${customfield_10300.requestType.name) 

 

The Insight Objects Hierarchy looks like this, with

  • having objects in x.x and x.x.x and
  • Insight ObjectType 1.x name = RequestType Name

 

  • Insight ObjectType 1
    • Insight ObjectType 1.1
      • Insight ObjectType 1.1.1
      • Insight ObjectType 1.1.2
    • Insight ObjectType 1.2

 

This does not get me any objects in the Create Screen though, can you maybe help if i do anything wrong?

 

3 answers

1 vote
Steve Letch March 8, 2023

It will work on your internal screens but not on the portal itself since Insight fields currently don't support customer request type placeholders or even a custom field if the custom field is hidden, it's why for example I've had to make separate top level category insight fields for each of my dynamic portal forms instead of just using one, because there's no placeholder for it to refine the list in a single field.

0 votes
Atlassian September 17, 2023

Hi @alex bauer , did you manage to find a way to make the Asset field depend on the request type? It would help me too!

Thanks

Steve Letch September 18, 2023

It's not possible with IQL at least, there MAY be something you can do if you're good with Groovy and make an initializer.

 

In terms of native functionality, even if you add a prefilled value to a hidden field, the assets field can't read it.

 

I got round it by having a very high level categorization field called 'Technology Request Type' that will only show objects of 'Portal Request Type' = Technology.

On a different dynamic form I don't have a need for this super high level field, but I still use the object attribute to refine. I have a Request Category field that's filtered to only show objects where inR(Portal Request Type = Trading.)

0 votes
Marco Brundel
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.
March 3, 2023

Hi @alex bauer ,

Some questions for a better understanding:

  1. Is Customfield_10300 the code of the requestType field in your Jira?
  2. In (${customfield_10300.requestType.name)  I miss the } after name. Do you have this in Jira?
  3. Do you have ObjectTypes with the same names as Request Types or do you have Objects with the same names as Request Types?

Regards, Marco

alex bauer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 6, 2023

Hi @Marco Brundel

thanks for looking into this.

  1. Yes, i checked in the API view
    2023-03-06 14_55_14.png
  2.  You are right, it wouldn't validate if it is written like this. So it should be: 
    objectType in objectTypeAndChildren(${customfield_10300.requestType.name})
  3. I have ObjectTypes with the same names as Request types
Steve Letch October 10, 2023

Something to add to this that recently came to my attention. Unfortunately the placeholder ${customfield_xxxxx.requestType.name} will work fine for a native single select, but doesn't work for Dynamic Forms Single Select fields. Have confirmed through testing with Atlassian and Deviniti :( I have an open ticket with Deviniti to look into it.

 

You can get the value in an assets post function, but unfortunately the value isn't being displayed in the name string format behind the scenes on a create or edit screen.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events