Jinja If else statement syntax
In case anyone else is looking for a solution to entering a conditional statement into a Pipeline as an out put value, here is what I learned today.
Below is the syntax entered into the place where the {{ c.values }} are put in the Pipelines Designer page. If anyone knows what these inputs are named please tell me.
{% if step.fieldname is gt(0) %} {{step.fieldname * -1}} {% else %} 0 {% endif %}
Explanation: The statement above is an if : else statement. {% %} these things signify the conditional statement part and {{ }} these are the values the field gets if the condition is met.
If the fieldname is greater than 0
{% if step.fieldname is gt(0) %}
then enter the value from fieldname from a previous step times negative 1
{{step.fieldname * -1}}
else do the next thing, which in this case is enter 0 into the fieldname from a previous step
{% else %}
finally end the if statement
{% endif %}
I looked around and couldn't find anything useful so here's a little nugget.
------------------------------
Jim Harrison
transparency = knowledge + understanding : The Scrum Dudes
------------------------------