Forums

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

Emulating JQL "in" functionality in Nunjucks?

Olap
Contributor
June 12, 2018

In JQL, I can write customer in ("customer A", "Customer B", "Customer C")

 

What would be the equivalent in Nunjucks? How can I create a condition to emulate that? 

 

Something like {{ issue.fields.issuetype.customer <in> ("customer A", "Customer B", "Customer C") }}

Any idea?

1 answer

0 votes
Olap
Contributor
June 13, 2018

{% set trigger = false %}
{% for item in[{ title: "cust A"}, { title: "cust B"}, { title: "cust C"},{ title: "cust D"}] %}
{% if issue.fields["Customer"] == item.title %}
{% set trigger = true %}
{% endif %}
{% endfor %}
{{ trigger }}

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events