21 Jun 2024
04:50 PM
- last edited on
24 Jun 2024
07:37 AM
by
MaciejNeumann
Inside Dynatrace -> Workflows. I was using the Jira Integration Tasks (Create Jira Ticket, and Transition Ticket Status). My goal was to transition Open Jira Tickets by Passing the "Key" to the transition task dynamically. (My screenshot will show this a little better)
I was unsure if this is a bug or a feature for filling in this field value when it forces you to use expression syntax you MUST use Quotes for your input value: {{ TransitionName }} -> {{ "TransitionName" }}
(screenshot 2)
Statically given the Issue Key -> Gives you a drop down that allows you to select the transition status
(screenshot 1,3)
Dynamically providing the Key -> Forces you to use Expression syntax, but you MUST WRAP your value in Quotes or it this task will break with this Error message: Error evaluating input - 'targetStatus': Undefined variables in '{{ Resolved }}': ResolvedError Using Transition Status Value without Quotes
Explaining dynamic and statically defining the Issue Key Changes the Transition status field:
Using Issue Key - Transition status given
Dynamically providing Issue Key - Transition status MUST have Quotes (because it uses {{ }} expression syntax)
27 Jun 2024 07:48 AM
Hi @scott-comeaux,
yes, your solution is correct. You have to use the expression {{ "Resolved" }} in the "Transition Status" field instead of {{ Resolved }} because you want to pass the string "Resolved" in this case. If you don't provide quotes around it, it thinks you are referring to a variable called Resolved, which could also be part of your workflow (hence the error message "Undefined variables"). This is not due to the implementation of the Jira for Workflows app, but how Jinja expressions work. Please refer to the documentation on expressions, and how they can be used here.
To conclude, it is not a bug, it is how expressions are supposed to work.