It says "Only execute this post-function if the following Groovy expression returns true"
I am trying write a script to change the assignee based on what a user chooses in a custom field, but I am not having any luck. I figure my script is wrong and I cannot find any information to help my particular case. I had something like this:
if(issue.get("Issue Source").getName() == "Agent Portal"){ return true; } else { return false; }
I got it to work doing this:
if (issue.get( "customfield_18173" ) == "Desktop" || issue.get( "customfield_18173" ) == "Support" ){ return true ; } else { return false ; } |
However, I want this to happen on creation, so I put it on the Create transition (the first one), but it is not working.
I got it to work doing this:
if (issue.get( "customfield_18173" ) == "Desktop" || issue.get( "customfield_18173" ) == "Support" ){ return true ; } else { return false ; } |
Also, make sure the post function is the first in the order.
I solved it by moving the post function to the first in the order. Thank you for your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Which post-function are you using? And where did you put the post-function in the list?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I got it to work doing this:
if(issue.get("customfield_18173") == "Desktop" || issue.get("customfield_18173") == "Support"){ return true; } else { return false; }
However, I want this to happen on creation, so I put it on the Create transition (the first one), but it is not working.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, I I misread your question. Maybe this answer is of any help https://answers.atlassian.com/questions/272403 ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What do you mean?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Cole,
I thing your tag and the title of your questions are inconsistent....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.