I'm using Set Field Value Post-function JMWE, and would like to set a Component post function after the ticket is created. My issue type is "Firefighter Ticket" and I'd like to add the component Firefighter after a Firefighter Ticket issue type is created.
I set the conditional execution to "Only if condition is true" and the groovy script to
issue.projectObject.name == "PROJECTNAME" && issue.issueType == "Firefighter Ticket"
However when I try to test the validation via the Test Groovy Script button, it returns as false. What am I doing wrong?
It would actually be easier to use the Issue Fields help tab below the editor to figure out how to test these fields.
in your case, the problem is that you want to test issue.issueType.name instead.
Hi David
Thanks for your reply. I entered in issue.projectObject.name == "PROJECTNAME" && issue.issueType.name == "Firefighter Ticket" however am still getting it returned as false
Is there something else I'm missing? Thanks 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.
You should test the script using the Test Groovy Script button, and if it returns false against an issue that is of the right issue type and in the right project, then you should test each part separately (project and issue type). And if one of them returns false, then test returning the value (without the comparison) to see what the _exact_ value is (case-sensitive).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah that is what I've been doing. It returns false for this section
issue.issueType.name == "Firefighter Ticket"
That is the name of the ticket, so I'm not sure what I'm doing wrong.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As I said, you can test issue.issueType.name to see what it returns. There might be an extra space, or a different in case.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.