Checkbox Scripting

Hi, I have created a checkbox field in Jira for which I have a set of values that will need to update different staff when selected. i.e.

Checkbox for 'Jira' is selected = Email comes to me

Checkbox for 'email' is selected = Email goes to someone else or group

I installed script runner for this and have been working all day to get the notifications sent but nothing goes through. Can you help and offer solutions to this issue?



6 answers

0 votes
Peter Bengov Community Champion Nov 10, 2014

Is it a problem with email-sending or a problem with getting Script Runner to "catch" relevant field values?

I know our Jira email is setup correctly so im assuming that the issue is down to incorrect syntax? Thanks

There's lots of different ways of doing this. Let's say you you have done it by creating a notification scheme with different events, where you are specifying the recipient.

Then you would have two Fire event post-functions (or listeners) with different conditions, which would fire the appropriate event. Condition would be defined like:

cfValues['Name of field']?.values.contains("Jira")

Jamie, can you tell how take status(checked(true) or unchecked(false)) for this field ?

i'am mean, some like this: 

    if (name of field == true) ....

Hi, Thanks for this. I had found this on another site but I added the values in brackets and they showed up red which I understood to be indicated a missing value?

I don't really understand what you mean, or rather where you are adding these values, can you post a screenshot?

2014-11-18 11_00_45-Update Workflow Transition Script Post-Function Function - Cambridge University .png

This is an example of what Im attempting to do. I enter the script in but the text shows up red, which would suggest to me that there is a missing link between the issue type and the condition? Thanks

No,. that's just the syntax highlighting, which is showing that 'Bug' is a string literal. There is no problem there. There should be a preview button when you can test if the condition evaluated to true or false.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

999 views 4 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you