Is there something similar to a switch statement in Jira Automation?
I would like to have a variable called env which has a different value depending on the status of the ticket. Something like if status equals this then env equals that, but I'm not sure what's the best way to do it. I then want to send a web request where that value will be used in the body.
I've tried defining it inline in the body, something like "env": "{{#if(equals(issue.status.name, "TRIGGER DEV DEPLOYMENT"))}}dev{{/}}{{#if(equals(issue.status.name, "TRIGGER INT DEPLOYMENT"))}}int{{/}}{{#if(equals(issue.status.name, "TRIGGER STG DEPLOYMENT"))}}stg{{/}}{{#if(equals(issue.status.name, "TRIGGER PRODEU DEPLOYMENT"))}}prodeu{{/}}{{#if(equals(issue.status.name, "TRIGGER PRODUS DEPLOYMENT"))}}produs{{/}}", but that didn't work.
I then tried to create the smart value in a separate variable step with the same value as above - that didn't work either.
I then tried to create a separate if status equals block then assign value step for each of these, but that also didn't work. It didn't work even when I tried to assign the var outside of all if statements. What can I be doing wrong?