I am trying to translate the following in to a Groovy script and I am a complete noob when it comes to scripting. I can read a script and figure out for the most part what it should do but writing one is a completely different thing.
If Platform Engineering Team = Platform EU
I am trying to use this to assign a ticket to a role on create if the custom field (Platform Engineering Team) has value (Platform EU) set.
Please help me out.
Assuming this field is a select list, you could use:
if (cfValues['My Single Select']?.value == "Some value")
or do it the long-hand way, there are lots of examples of that here and in the docs: https://scriptrunner.adaptavist.com/latest/jira/
What is the context of this script? What is 'Platform Engineering Team,' what is 'Platform EU?'
Platform Engineering Team is a custom field (single select) and Platform EU is one of it's options.
When I tried this:
IF (cfValues['Platform Engineering Team']?.value == "Platform EU")
I got the following error:
Error creating issue: No such property: cfValues for class: Script1
And your script is a post-function? Or is this for the Script Console?
can you provide a screenshot of the configuration so we can check the context
Screen Shot 2016-04-18 at 9.42.36 AM.png
Here is where I am trying to put this in to place.
It looks like you're new here. Sign in or register to get started.