Hi,
I want to send a mail when the custom field date ("Target start) changes.
Is this possible to check that each time the date changes, a mail is sent ?
Thanks
Swarna
Hello @Swarna Radha
You need a plugin for this feature to be implemented. I use Script runner's (paid plugin) listener feature for this, there are plenty of sample available for script listeners.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Apart from Script runner there are other plugin like "Power Scripts" and "Automation for JIra" which can help you achieve your requirement but all of these are paid plugins.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Tarun Sapra
I have used a script to verify the target date but the listener is not running.
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
Issue issue = issue
//issue.getIssueType()== "Sub-task"
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def issueManager = ComponentAccessor.getIssueManager()
def customField = customFieldManager.getCustomFieldObjectByName("Target start")
def originalIssue = issueManager.getIssueObject(issue.id)
issue.getCustomFieldValue(customField) != originalIssue.getCustomFieldValue(customField)
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you used the Listener in the script listener section? Where have you added this code?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, I am using the listener in script listener. I have added the code in send a custom mail.
Please see screenshot
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you Change this line
Issue issue = issue
to
Issue issue = event.issue
Also, where are the logs? Please add some logs so we see what's exactly going on. Because issue update event is fired when you update an custom field. PLease add some logs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When i add the Issue issue = event.issue. I get error. Please see screenshot
The event is not run so i am not able to get log.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you get any mails from jira based on notification scheme when you update the custom field
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, I am not getting any mails upon updating the custom field. The field "Target start" is a field from JIRA Portfolio and i am updating the field from JIRA Portfolio.
When i add target start from JIRA Portfolio, then I commit on it. Then the target start is updated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Since only now you share that it's a portfolio field, thus I can share that this might not work as not event is fired when you update the field on the plan view.
This is an open issue
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.