Rally - Jira - Jira-config-Emailer.pxml

Document ID : KB000126064
Last Modified Date : 04/02/2019
Show Technical Document Details
Introduction:
Test the <Emailer> feature of Rally's JIRA (and others) connector.
Instructions:

 

Below are three sections relating to this JIRA connector run:
  1. This configuration file: Jira-config-Emailer.pxml
  2. The logfile output: Jira-config-Emailer.plog
  3. The email sent to user: Jira-config-Emailer.peml


Sample configuration file:
<!-- **********************************************************************
FILE:    Jira-config-Emailer.pxml

PURPOSE: Test the <Emailer> feature of Rally's JIRA (and others) connector.
         This will send an email to the designated user only when ERRORs or
         WARNINGs occur.

USAGE:   Replace all the "Your-..." strings below with values appropriate
         for your environment.
*********************************************************************** -->
<Config>
    <RallyConnection>
        <Url>Your-Rally-URL</Url>
        <WorkspaceName>Your-Rally-Workspace</WorkspaceName>
        <Projects>
            <Project>Your-Rally-Project</Project>
        </Projects>
        <User>Your-Rally-Username</User>
        <Password>Your-Rally-Password</Password>
        <ArtifactType>Defect</ArtifactType>
        <ExternalIDField>Your-Rally-ExternalID</ExternalIDField>
    </RallyConnection>

    <JiraConnection>
        <Url>Your-JIRA-URL</Url>
        <Project>Your-JIRA-Project</Project>
        <User>Your-JIRA-Username</User>
        <Password>Your-JIRA-Password</Password>
        <ArtifactType>Bug</ArtifactType>
        <ExternalIDField>Your-JIRA-ExternalID</ExternalIDField>
    </JiraConnection>

    <Connector>
        <FieldMapping>
            <Field><Rally>Name</Rally>        <Other>Summary</Other></Field>
            <Field><Rally>Description</Rally> <Other>Description</Other></Field>
            <!-- I use the following field mapping to force the generation of a
                 WARNING so the <Emailer> section below will be triggered.
            -->
            <Field><Rally>Priority</Rally>    <Other>Priority</Other></Field>
        </FieldMapping>
    </Connector>

    <ConnectorRunner>
        <Preview>True</Preview>
        <LogLevel>Debug</LogLevel>
        <Services>COPY_RALLY_TO_JIRA</Services>

        <!--The following <Emailer> section is for specifying the SMTP server - with TLS and Authentication. -->
        <Emailer>
            <!-- The following <Level> can be either "Error" or "Warning" only.
                     - Specifying "Warning" will send email on errors and warnings.
                     - Specifying "Error" will send email on errors only.
                     - An email is sent only when issues occur, not when everything is OK.
            -->
            <Level>Warning</Level>
            <SendEmailFrom>Your-Gmail-Username</SendEmailFrom>
            <SendEmailTo>Your-Rally-Username</SendEmailTo>
            <SMTPServer>smtp.gmail.com</SMTPServer>
            <SMTPPort>587</SMTPPort>
            <SMTPDomain>gmail.com</SMTPDomain>
            <SMTPUser>Your-Gmail-Username</SMTPUser>
            <SMTPPassword>Your-Gmail-Password</SMTPPassword>
            <SMTPSec>TLS</SMTPSec>
        </Emailer>
    </ConnectorRunner>
</Config>

Log file snippet from connector run:
[2012-09-21 23:27:00 Z]  INFO : ConnectorRunner.run_services - Last Run 2012-09-21 23:21:34 UTC  --- Now 2012-09-21 23:27:00 UTC
[2012-09-21 23:27:00 Z]  INFO : ConnectorRunner.process_service - Starting Service COPY_RALLY_TO_JIRA
[2012-09-21 23:27:00 Z]  INFO : RallyConnection.find_new - Find New Rally defects
[2012-09-21 23:27:00 Z]  INFO : RallyConnection.find_new - find_new query: JIRAPR01ExtID = "" and Project = PR01 - Brewing - Beer - All Grain
[2012-09-21 23:27:00 Z]  INFO : RallyConnection.find_new -   Found 1 new defects in Rally
[2012-09-21 23:27:00 Z]  INFO : Connector.copy_to_other - Copy to JIRA
[2012-09-21 23:27:00 Z] DEBUG : Connector.block in map_fields_to_other -   Mapping Name(JP test date FH) - to - Summary(JP test date FH)
[2012-09-21 23:27:00 Z] DEBUG : Connector.block in map_fields_to_other -   Mapping Description(xxxx) - to - Description(xxxx)
[2012-09-21 23:27:00 Z] DEBUG : Connector.block in map_fields_to_other -   Mapping Priority(Resolve Immediately) - to - Priority(Resolve Immediately)
[2012-09-21 23:27:00 Z]  WARN : JiraConnection.initialize - Invalid value Resolve Immediately for field priority
[2012-09-21 23:27:00 Z]  WARN : ConnectorRunner.exception - Message Invalid value Resolve Immediately for field priority
[2012-09-21 23:27:00 Z]  INFO : ConnectorRunner.process_service - Finished Service COPY_RALLY_TO_JIRA
[2012-09-21 23:27:00 Z] DEBUG : Finding method logout
[2012-09-21 23:27:00 Z]  INFO : JiraConnection.disconnect - Disconnected from JIRA
[2012-09-21 23:27:00 Z]  INFO : ConnectorRunner.run_services - time file written with value of 2012-09-21 23:27:00 UTC
[2012-09-21 23:27:00 Z]  INFO : ConnectorRunner.block in log_service_statistics - Jira-config-Emailer.xml: 0 items copied from Rally to Jira 
[2012-09-21 23:27:00 Z]  INFO : ConnectorRunner.log_service_statistics - Jira-config-Emailer.xml: service run took 17 seconds

The email sent to the user from the connector:
Return-Path: <user@gmail.com>
Received: from  (53-19-132-1.xxx.static.qwest.net. [53.19.132.1])
        by mx.google.com with ESMTPS id a1sm999999igc.7.2012.09.21.16.27.01
        (version=TLSv1/SSLv3 cipher=OTHER);
        Fri, 21 Sep 2012 16:27:02 -0700 (PDT)
Message-ID: <587eb3a7.d43c782a.53c6.09cb@mx.google.com>
From: user@gmail.com
To: user@rallydev.com
Subject: rally2_jira_connector.rb Errors for Jira-config-Emailer.xml
Date: Fri, 21 Sep 2012 16:27:02 -0700 (PDT)

--------------------------------------------------------------------------------------------------

Warnings:

2012-09-21 23:27:00 Z - JiraConnection.initialize - Invalid value Resolve Immediately for field priority
2012-09-21 23:27:00 Z - ConnectorRunner.exception - Message Invalid value Resolve Immediately for field priority