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, jira product discovery, jpd premium, product management, idea management, product discovery, jira premium, product planning, atlassian community, product development, roadmap planning, product prioritization, feature management

Introducing Jira Product Discovery Premium ✨

Jira Product Discovery Premium is now available! Get more visibility, control, and support to build products at scale.

Learn more
AUG Leaders

Atlassian Community Events