Scripted Field in Notification Scheme

I would like to use a Script Runner Scripted Field in a Notification Scheme. Is there a ready way to do so?

I'm using Script 'User Picker (single user) template and searcher "User Picker Searcher". 

The field shows up on my issues - I'm using a basic test definition like what follows - but it doesn't show as an option under notifications... What am I doing wrong, and how can I work around it? 

 

import com.atlassian.jira.user.ApplicationUsers
log.warn ("Script field running")
ApplicationUsers.from(issue.reporter)

2 answers

I just set it up as you described it. I see this scripted customfield available in the notification scheme under "User Custom Field Value" (using JIRA 6.3.9 and scriptrunner 3.0.6).

That's what I thought should happen.. I'm running Script Runner 2.1.17 and 6.2.x.. I'll try updating before anything else. Thanks.

There are differences in the two versions... this issue specifically is fixed somewhere after 2.1.17.

@Udo Brand

After you configued the notification with "User Custom Field Value", if it works, and if the user from your script can receive notification mail?

I have set this too, but the user cannot receive mail even though Notification Helper show this user shoudl receive mail.

Thanks and Regards

have you checked things like whether the user has disabled receiving mail as a consequence of their own actions? Does it not work with any user?

That would have been my guess too.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 31, 2018 in Marketplace Apps

Marketplace Spotlight: Zephyr

Hello Atlassian Community! Each month, we run a series of Spotlights to highlight Marketplace vendors and apps that our team thinks this Community would find valuable. In last month's Spotlig...

335 views 0 1
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