Versions Compared

Key

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

Table of Contents

Info
titleRequired PluginsApps

You will need the following JIRA plugins Jira apps:

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

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, these emails are not to be automatically sent because not all the changes or issues need an email notification.

Our Power Actions for JIRA plugin offers Jira app offers you a very simple solution to build and send emails to all or certain project members at a click of a button.

This solution presents one of many that the SIL and Power Actions for JIRAJira can implement.

You can simply let your imagination run free ...

Solution

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

Step 1: Create a new

...

Power Actions Custom Field

The first step consists in creating a new Blitz Action Power Actions 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 Power Actions Custom Field

Configure Email Issue custom field by doing the following:

  • Choose the cog iconImage Removed at Image Added 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 ActionPower Actions 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

...

Power Actions Screen Script

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

As we said previously, the Condition Script can be configure in order to prevent certain users to send the emails. For more information please use the Condition Script page.

...

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

Step 4: Configure the

...

Power Actions 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.

The Issue screen will have the Send Email button, like this:

Image RemovedImage Added

After you click the button you'll need to confirm your email:

Image RemovedImage Added

Press Click the Execute button and the email will be sent.

...