Forums

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

Trying to use nunjucks to search the contents of description for a specific word

Shawn Smith
Contributor
February 22, 2018

Is it possible to use nunjucks to search the value of description for a word or phrase that is somewhere in the value?  I've tried to use the "~" and also tried to use find command but nothing seems to work.

 

For a simple test, I'm trying to find the word "Voicemail" inside the description.  It always retruns 101, even if I change Voicemail to have a "zero" as the letter "o".

 

{% set x = "200" %}
{% if issue.fields.description ~ Voicemail %}
{% set x = "101" %}
{% endif %}
{{ x }}

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events