Versions Compared

Key

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

...

  1. Click the Edit Script link. Write this SIL code in new page.

    Code Block
    titleAction Script
    string[] to = replace(BA_getSingleValue(argv, "Send to"), ",", "|");
    string[] cc = replace(BA_getSingleValue(argv, "CC"), ",", "|");
    string subject = BA_getSingleValue(argv, "Subject");
    string body = BA_getSingleValue(argv, "Email body");
    string[] attachments = BA_getMultiValues(argv, "Attachments");
    return sendEmail(userEmailAddress(currentUser()), to, cc, subject, body,"en_US", attachments);


  2. This code provides the following actions:

    • Takes the email addresses that the user filled in and if there are more than one email creates a list with all of them.
    • Gets the subject of the email.
    • Builds the body of the message by using a template or by creating the email body from the text that the user filled in.
    • Gets the paths from the attachments from the Attachments field of the Email Issue custom field.
    • Sends the email with all the details filled by the user that send the email.

Note, we you can use a template for the email which means that we you have to create a template file that contains all the relevant fields of the issue. Also, for more information about sending an email using SIL see the sendEmail routine.

Step 5: Build the email template

To create the email template go to Jira Administration > System > cPrime Plugin Configuration > Mail Sender Configuration.

After the installation of the plugin, in the "Administration" menu, a new option will appear named "Kepler General Parameters". Go to it and select "katl-commons" app 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).

...