Forums

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

How to access value of a cascading list within {{fieldChange.toString}}?

Meghanand Baraskar
Contributor
July 1, 2022

Hi,

Requirement:

I have a cascading list field and what I want to achieve is whenever the value for this field is amended then check if any other issues have the same amended value.

My approach to do this is as below (in the screenshot, DP - cascading list field)

Screenshot 2022-07-01 at 20.52.06.png

The issue I am facing is that the value for the cascading list is not substituted in the JQL and hence the look up doesn't work as expected.

Logs:

Screenshot 2022-07-01 at 20.52.48.png

I need help in knowing how to make sure that the value of the cascading list gets substituted so that the JQL works as expected.

 

Regards,

Meghanand

1 answer

1 vote
Bill Sheboy
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.
July 1, 2022

Hi @Meghanand Baraskar 

As you are trying to use JQL on the values, I believe you will need to separate the parent and child values to use cascadeOption(): https://support.atlassian.com/jira-software-cloud/docs/advanced-search-reference-jql-functions/#Advancedsearchingfunctionsreference-cascadeOptioncascadeOption--

Please take a look at this other post for the smart values to use in your query: https://community.atlassian.com/t5/Jira-Software-questions/Smart-value-for-quot-Select-List-cascading-quot-field/qaq-p/1901936

Kind regards,
Bill

Meghanand Baraskar
Contributor
July 1, 2022

Thanks @Bill Sheboy however in the above screenshot if you look at what the log prints, {{fieldChange.toString}} fails to print the value held within the field. So in the next step (JQL) I still won't know how to access the parent and child values if I have to use the cascadeOption. 

The 2nd pointer talks about accessing value of field when you have issue as the smart value. However, in my case I don't have issue as smart value. I was trying to use {{fieldChange.toString}} which I was expecting to return me the value within the field but it doesn't.

Bill Sheboy
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.
July 2, 2022

When using {{fieldChange.toString}} you are getting a text (string) version of the current field default values (e.g. cascading field id).  As you appear to want the current value, that second link shows the field's smart values you may use instead in the JQL.

Meghanand Baraskar
Contributor
July 3, 2022

I tried the below but didn't quite get what I was expecting. Should I do this some other way?

Screenshot 2022-07-03 at 11.03.39.png

 

Screenshot 2022-07-03 at 11.04.21.png

Suggest an answer

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

Atlassian Community Events