The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

script runner question for custom fields - notification issue

Sam Rajagopal
May 6, 2015

We have a custom field called 'Customer Impact'. Please note the single space between 'Customer' and 'Impact'. When this field is set, I would like to send an email to customer support organization. If you have any thoughts, please suggest. Hoping to use "script runner".

I went ahead and added a new event as follows :

system -> events -> Add New Event
Name : Informed Support
Description : Customer Impact field updated
Template : Issue updated

How do I associate this event with the workflow ?
Basically, how to generate notification by watching for the status of a custom field. ?

My another question is - in our jira project screen, we have a checkbox for doc required (yes/no). If checkbox is checked, I would like to be able to send a notification to the doc team.

Thanks Jamie

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
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 Champions.
May 11, 2015

If you're not sure about your condition, test the different clauses separately. If you just want to check the text field has a value use:

cfValues['Customer Impact']

I think that is all you need.

 

Sam Rajagopal
July 17, 2015

thanks Jamie. That works.

0 votes
Sam Rajagopal
July 17, 2015

I chose "Send a custom email" listener, with the condition string to be -

changeItems.any {it.get('field')=='customfield_10301'} && cfValues['customfield_10301'] == 'true'

Email Template = $issue

Subject Template = customer escalation for $issue

I don't see any email coming along.. 10301 is the id for  custom field "Customer Impact" This is a text entry box where you can type in, a paragraph. So, value == "true" is reasonable ?

any clues please ?