Scripted Field in Notification Scheme

Tim_Brigham March 11, 2015

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

1 vote
Udo Brand
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 11, 2015

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).

Tim_Brigham March 11, 2015

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.

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 18, 2015

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

0 votes
xiaoxue chen September 24, 2015

@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

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 24, 2015

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?

Udo Brand
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 25, 2015

That would have been my guess too.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events