Forums

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

Nunjucks

valkyre57
Contributor
October 4, 2021

hello dears

I tried couple of options but not working any. 

please check 

1. {{ issue.fields["Customer Request Type"].requestType.id == "470" and issue.fields.customfield_11694 | find("Aviator") }}

2. {{ issue.fields["Customer Request Type"].requestType.id == "470" and issue.fields["Company"] | find("Aviator") }}

3. {{ issue.fields["Customer Request Type"].requestType.id == "470" and issue.fields["Company"].value ==  | "Aviator" }}

 

the field is multi selects choise.

1 answer

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 4, 2021

Please explain in words what you are trying to accomplish, and where you are trying to use this information.

valkyre57
Contributor
October 6, 2021

hello

I am trying configure "post function" in transition.

this code is in Condition sectionScreenshot_2.jpg

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 14, 2021 edited

It looks like you are working to set a condition that is relevant to a Service Management project, based on your use of "Customer Request Type". Is that correct?

And the condition you are trying to set is for a Service Management issue where the Customer Request Type has the ID470, and the issue also has the value "Aviator" in a field named "Company". Is that correct?

What type of field is "Company"? Is it a text field, a selection field, a multi-select field, a Labels field, ...?

Have you used the Nunjucks Tester to test your condition against specific issues? What are the results? Have you tested each of your conditions independently to figure out which one works and which one doesn't?

valkyre57
Contributor
October 25, 2021

sorry for late response. yes field is multi select

tester response fail

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 25, 2021

Have you tested each of your conditions independently to figure out which one works and which one doesn't?

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 25, 2021

Taking the example from the Nunjucks documentation

https://innovalog.atlassian.net/wiki/spaces/JMWEC/pages/108200055/User+created+custom+fields#Usercreatedcustomfields-Checkboxes%2FMulti-selectlist

...it looks to me like your test on the Company field is not correct and needs to be

{{ issue.fields["Company"] | find({"value":"Aviator"}) != null }}

Disclaimer: I don't have the Nunjucks app on my system. I can't test my suggestions before giving them to you. 

Suggest an answer

Log in or Sign up to answer