-->

Send email to custom user field on change, in JIRA

2019-06-21 02:30发布

问题:

We have custom user fields (ie 'Business Analyst', 'Developer', etc.) in JIRA, and we would like to be able to send an email to those users when they are assigned to one of those fields. I have looked over the JIRA wiki, and could not find a way to do this.

I know this is possible with the 'Issue Assigned' event, but in this case, the JIRA is not being assigned, since we are using custom fields.

Is this at all possible?

回答1:

You should look at the JIRA Scripting Suite plugin --- you can easily do something like that, and in fact, they provide a sample script that shows you how to send a custom email (https://studio.plugins.atlassian.com/wiki/display/JSS/Scripting+Samples).

But you do have to catch two use cases --- as a post-function to a workflow transition and as a plain edit. This plugin allows you to do both of those. I typically just worry about handling those things at the point in the workflow in which those fields are required for the first time, and handle it in a post-function.

This plugin completely changed the power of JIRA for me. I can quickly change scripts on the fly without recompiling or restarting JIRA. You must check it out.



回答2:

This plugin: Email This Issue should be what you are looking for (sending email to custom fields).

Email an issue from JIRA to arbitrary recipients - This plugin addresses this feature request fulfilling considerable amount (currently 30) of user votes.

The plugin contains an issue operation component that allows users to compose an email and send the issue to arbitrary recipients.

Most important features are:

  1. send email with issue details to email addresses outside JIRA, assignee, reporter and watchers.
  2. attach issue attachments to email
  3. control who can invoke the operation through a project role
  4. text and html email format are supported, email body understands Confluence wiki markup
  5. email template can be customized per project and issue type
  6. a comment is created reflecting the event of sending an email (body, recipients, etc) - see below
  7. i18n-enabled, the plugin can be translated, it is currently available in English, German, French, Polish, Italian and Hungarian.
  8. you have options like "CC to me" and "Reply to me" to receive a copy of the email or to receive replies to the email.
  9. < li>email recipients are added to watchers on demand
  10. recipients from custom fields and groups/project roles can be added
  11. email options may be reused, i.e. there is no need to check all your options every time you send an email
  12. configure default values for email options via configuration file