Forums

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

How to send mail base on a custom field

ClaireYang
Contributor
July 31, 2019

There are two custom fields in the project. One is a check list field named "Need Notification" which has 2 values "Yes" and "No". The other is a datatime picker field name "Set notification time".

What we need is, when a user select "Need Notification" as "Yes", and he then set a datatime in field "Set notification time", for example on 2019/8/10 10:00 AM.  When it comes to 2019/8/10 10:00 AM, jira will send a mail to the person.

I plan to use script runner to do this. In Script Listeners --> Send a custom mail, I set "Condition and Configuration" as below:

 

cfValues['Need Notification'] == 'Yes' && cfValues['Set notification time'] == now()

 

But seems it doesn't work. Would you please tell me how to write the condition script?

Thank you very much!

 

1 answer

1 vote
Antoine Berry
Community Champion
August 1, 2019

Hi @ClaireYang ,

The listener listens to an event and will execute each time the event is triggered. In your case you probably should create a custom event, trigger it in a service using a script which will execute the listener and send the mail.

You could run the service every x min and check if there is a mail to send.

Hope that was clear enough.

Antoine

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, loom, loom for training, loom for teaching, video training, async learning, online education, screen recording, loom tutorials, loom use cases, atlassian learning, team training tools, instructional video, virtual training tools

🛗 Elevate Your Training and Enablement with Loom

Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!

Register today
AUG Leaders

Atlassian Community Events