Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info
titleRequired Plugins

You will need the following JIRA plugins:

  1. Power Actions for JIRA(former Blitz-Actions)

Level:  BASIC

Problem

In certain situations some users needs to be informed about new issues or changes in the issue fields by the project manager or other users with specific roles in the project. Also, this emails, are not to be automatically send because not all the changes or issues need an email notification.

...

You can simply let your imagination run free ...

Solution

In order to solve this issue you will have to use a Blitz Action custom field that builds an email via a template and sends it to its recipients.

Step 1: Create a new Blitz Action Custom Field

The first step consists in creating a new Blitz Action custom filed, as follows:

  • Go to Administration page.
  • In this page go to the Issue section.
  • Here you will find a link named Custom Fields; you should click on it.
  • Add a new custom field from the button in the right top of the screen ("Add Custom Field").
  • Choose the Blitz Actions Custom Field option and press Next.
  • Name this newly created custom field: "Email Issue".
  • Choose your applicable issue types and applicable context in order to view the new created custom field only on certain issues and projects - as you desire. By default the custom field is visible in global context.
  • Click Finish.

Step 2: Configure your Blitz Action custom field

Configure Email Issue custom field by doing the following:

  • Choose the cog icon at right of the screen for your "Email Issue" custom field. This can be done by going to the Custom Fields page.
  • Click the Configure link.
  • Now we'll need to create a button that will trigger the email sending action.
  • Click on the Edit Buttons link. You will find it on the bottom of the page in the section named Buttons.
  • Add New Blitz Action by creating a Button Text called: "Send Email". Press the Add button.
  • At the end of this operation you'll see 5 links for this button in the right of the screen.
  • The first three of them are the SIL scripts that controls it.
  • The first script, named Condition Script, contains the condition for the button visibility. The default value is visible, so if you want all the user to see and action this button you can let the default script.
  • The second Script, named Screen Script, allows you to determine if the send email action requires additional data.
  • The third Script , named Action Script, sends the email you'll want to the specified email addresses.

Step 3: Configure the Blitz Screen Script

In order to send the email you will need to configure the Blitz Action Scripts.

...

This code will show a read only message in the screen.

Step 4: Configure the Blitz Action Script

The Action Script is the one that sends the email to the desired users. To edit the Action Script click the Script link from the Configure Email Issue page and  add the following code:

...

Because we used in the previous code a email template we'll need to create and use this template named: template.tpl.

Step 5: Build the email template

After the installation of the plugin, in the "Administration" menu, a new option will appear named "Kepler General Parameters". Go there and select "katl-commons" plugin from the Select plugin list. A configuration option named "Email Template Directory" depicts the directory where  the templates are kept. The directory path is relative to the jira.home.dir/kepler. The rest of the email configuration is extracted from the standard JIRA configuration (Administration->Mail Servers->SMTP Mail Server).

...

Info
titleEmail Templates

You can consult the Email Templates page for further information. Also consult the Mail Configuration page.


Test

You can now test this custom field by going to the issues you have selected in the first step of this recipe.

...