I want to be able to have a number of check boxes within the Issue create page, with these to include what teams will need to be involed with this issue;
Teams Involved:
Team1
Team2
Team3
Team4
So when the issue is created, if any of those checkboxes have been checked an email is sent to that team in addition. I tried using the builtin script runner but I wasn't able to get this working, I know the custom field ID of the Teams Involved field, I just need help creating the script to run this.
Thanks
I assume you have seen this.
So I am guessing you have problems with condition then?
So wouldnt it be:
cfValues["Team Name:"]?.getValue() != "Team1"
Hope this helps
Ok, so my settings are as follows:
Builtin Script Runner - Send a custom email
Condition: cfValues["Teams Involved:"]?.getValue() != "Team1"
Result: java.lang.NullPointerException: Cannot invoke method getId() on null object
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Forgot that checkbox is different, Jamie has answered pretty well in here
Also to note that the condition should be TRUE to make the script to run (like running email) so in your example, any name other than Team1 would send the email.
Hope this helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So I've set this up as suggested, and when I select Preview I get the following;
Condition The condition evaluated to true (note that for listeners the condition can't normally be tested)
Then I select Run and I get the following;
Result: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'com.atlassian.jira.event.issue.IssueEvent@7ab5f6cf[issue=IS-3753,comment=<null>,worklog=<null>,changelog=<null>,eventTypeId=1,sendMail=true,params={},subtasksUpdated=false]' with class 'java.lang.String' to class 'com.atlassian.jira.event.issue.IssueEvent'
Where IS-3753 is the test ticket, for which the value of the condition is true.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So I've set this up as suggested, and when I select Preview I get the following;
Condition The condition evaluated to true (note that for listeners the condition can't normally be tested)
Then I select Run and I get the following;
Result: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'com.atlassian.jira.event.issue.IssueEvent@7ab5f6cf[issue=IS-3753,comment=<null>,worklog=<null>,changelog=<null>,eventTypeId=1,sendMail=true,params={},subtasksUpdated=false]' with class 'java.lang.String' to class 'com.atlassian.jira.event.issue.IssueEvent'
Where IS-3753 is the test ticket, for which the value of the condition is true.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
do you have screenshot? i t seems like you are adding another code fro issue event?
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.