This plugin integrates with Atlassian JIRA. It creates and updates issues automatically and supports reports.
This plugin uses the JIRA Server platform REST API.
Plugin Version 2.3.0.2023100452
Revised on October 05, 2023
Updated Perl version required
This plugin is using an updated version of Perl, cb-perl shell (instead of the old ec-perl). This means that it needs CloudBees CD/RO agent version 10.3+ in order to work.
Create Jira plugin configurations
Plugin configurations are sets of parameters that can be applied across some, or all, plugin procedures. They can reduce the repetition of common values, create predefined parameter sets, and securely store credentials. Each configuration is given a unique name that is entered in the designated parameter for the plugin procedures that use them. The following steps illustrate how to create a plugin configuration that can be used by one or more plugin procedures.
To create a plugin configuration:
-
Navigate to
. -
Select Add plugin configuration to create a new configuration.
-
In the New Configuration window, specify a Name for the configuration.
-
Select the Project that the configuration belongs to.
-
Optionally, add a Description for the configuration.
-
Select the appropriate Plugin for the configuration.
-
Configure the plugin configuration parameters.
-
Select OK.
Depending on your plugin configuration and how you run procedures, the Differences in plugin UI behavior. field may behave differently in the CloudBees CD/RO UI. For more information, refer to |
Create Jira plugin procedures
Plugin procedures can be used in procedure steps, process steps, and pipeline tasks, allowing you to orchestrate third-party tools at the appropriate time in your component, application process, or pipeline.
Depending on your plugin configuration and how you run procedures, the Differences in plugin UI behavior. field may behave differently in the CloudBees CD/RO UI. For more information, refer to |
CollectReportingData
Gathers reports from the specified Jira instance. For information on configuring the CollectReportingData procedure to associate issues with a Jira feature or defect object or retrieve summary data, refer to Configure the CollectReportingData procedure.
Input parameters
Parameter | Description |
---|---|
Configuration name |
Required. The previously defined configuration for the plugin. |
JIRA filter ID |
Jira filter used to find the issues or defects in Jira. |
JIRA query |
JQL to select issues. Either this parameter or the JIRA filter ID parameter must be specified. |
Field mapping |
Jira fields that identify the release that the feature or defect is associated with (for example, |
Report object type |
Type of report object. The available values are Feature and Defect. |
Fields to aggregate |
Jira fields to aggregate. For each group based on the status field and additional group by fields, the sum of each of the specified fields are calculated and stored as separate fields. These fields are expected to be numeric fields. Each field can be optionally specified as |
Allow missing fields |
If selected and the Fields to aggregate parameter has missing fields, the value is considered to be |
Metadata property path |
Property sheet where run metadata is stored. If omitted, |
Transformation script |
Perl script for payload customization. This method is invoked by a plugin with three parameters. The first parameter is the context object, the second parameter is the payload object, and the third parameter is the refined issue fields. The method should be named
|
Preview |
If selected, no data is sent to the reporting system. Use this option to preview gathered data. |
Release filter URI |
URI that is used with the base URL to build a drill-down URL for JIRA in a dashboard widget. |
Debug |
If selected, the debug level is set to Debug. |
CreateIssues
Creates one or more Jira issues.
This procedure is compatible with the CreateDefects procedure from the EC-DefectTracking-JIRA plugin. If no summary is provided, it looks for the property sheet named
At least one of the properties must be provided. The best way to fill in the properties is to use post processors. Refer to this example of a post processor for JUnit. If the Summary field is defined, only one issue is created. If there is no summary and no predefined properties, no issues are created and the procedure finishes successfully. |
Input parameters
Parameter | Description |
---|---|
Configuration name |
Required. The previously defined configuration for the plugin. |
Project Key |
Required. Jira project key (for example, |
Issue Type |
Jira issue type. The most common Jira issue types are Bug, Task, Sub-task, Story, and Epic; the available types depend on the Jira project. To view the list of the available types, please use the Jira REST API. For example:
|
Summary |
Short description of the issue. If this field is provided, only one issue is created. Maximum length of the summary is 255 characters by default, and managed by the Jira instance itself. |
Assignee Name |
Person assigned to the Jira issue. You must provide the sign in name for an existing user (for example, |
Labels |
Comma-separated list of issue labels (for example, |
Affects Version(s) |
Comma-separated list of affected versions (for example, |
Fix Version(s) |
Comma-separated list of versions that you plan on releasing a feature or bug fix to customers (for example, |
Description |
Full description of the issue, the steps to reproduce, and the expected results. Markup can be used here, for example:
|
Additional parameters |
Any additional parameters to be specified for the Jira issue, in JSON format.
For example: Refer to the Jira REST API for supported parameters for the create issue API. Example formats for this parameter are:
|
Result Property |
Property sheet to store results. |
Result Format |
Format to store results, JSON, or property sheet. Property sheet is selected by default. |
Create Summary Link? |
If selected, a report with a summary and links are attached to the pipeline summary and job summary. |
Summary link property |
Property to store a report is generated and attached to the pipeline summary and job summary. The default value is |
Summary link title |
Title for a link to download a report. The default title is |
CreateNewVersion
Creates a new version in the specified project.
Input parameters
Parameter | Description |
---|---|
Configuration name |
Required. The previously defined configuration for the plugin. |
Project Key |
Required. Jira project key (for example, |
Version Name |
Required. Jira version to be created. |
GetIssues
Retrieves issues from Jira using the provided JQL or the previously saved filter.
Input parameters
Parameter | Description |
---|---|
Configuration name |
Required. The previously defined configuration for the plugin. |
JIRA Filter ID |
Jira filter used to find issues in Jira. Either this parameter or the JIRA Query (JQL) parameter must be specified. |
JIRA Query (JQL) |
JQL to search issues. Either this parameter or the JIRA filter ID parameter must be specified. For more information, refer to the JQL documentation. |
Max Results |
Maximum number of Jira issues to retrieve. The default value is defined by the Jira instance. |
Result Format |
Format to store the results. For more information, refer to Result format. |
Result Property |
Property to store results. Retrieved Jira issues are saved under this property if Result Format is selected. By default, this is |
Create Summary Link? |
If selected, a report with a summary and links are attached to the pipeline summary and job summary. |
Summary link property |
Property to store a report is generated and attached to the pipeline summary and job summary. The default value is |
Summary link title |
Title for a link to download a report. The default title is |
Field List to Save? |
Additional comma-separated fields that should be saved within the issue property (for example, |
GetProjectVersions
Returns one or more Jira project versions based on user-specified criteria.
Input parameters
Parameter | Description |
---|---|
Configuration name |
Required. The previously defined configuration for the plugin. |
Project Key |
Required. Jira project key (for example, |
Version Name(s) |
Comma-separated list of version names. This can be useful if you want to retrieve information about specific versions (for example, |
Version Status |
Retrieves only the versions with the specified status. |
Max Results |
Maximum number of versions to retrieve. The default value is defined by the Jira instance (typically, it is |
Order By |
Name of the field to sort the result list by. Prepend a minus sign to use descending order. Values: |
Show Issues Count by Status |
If selected, a count of issues is included in the version’s info and HTML report, in order by status. |
Result Format |
Format to store results. For more information, refer to Result format. |
Result Property Name |
Name of the property to store results, when JSON or Property Sheet is selected for Result Format. By default, the name is |
Create Summary Link? |
If selected, a report with a summary and links are attached to the pipeline summary and job summary. |
Summary link property |
Property to store a report is generated and attached to the pipeline summary and job summary. The default value is |
Summary link title |
Title for a link to download a report. The default title is |
LinkIssues
Parses a provided property for Jira issue keys and links them to the job and pipeline.
Input parameters
Parameter | Description | ||
---|---|---|---|
Configuration name |
Required. The previously defined configuration for the plugin. |
||
Prefix |
Provide the key used by Jira as the prefix for defects within a project. If this field is blank, a regular expression is used to attempt to match with defect IDs. |
||
Regular Expression |
Perl-compatible regular expression to retrieve issue IDs from source control logs. For example, Examples:
|
||
Property to Parse |
Provide the property or property sheet used to search for defect IDs. If this field is blank, the default property
|
||
Result Property |
Property sheet or property name to store results. |
||
Result Format |
Format to store results, JSON, or the property sheet. Retrieved Jira issues are saved under this property. For more information, refer to Result format. |
MarkVersionAsReleased
Marks a specified version as released in the specified project.
Input parameters
Parameter | Description |
---|---|
Configuration name |
Required. The previously defined configuration for the plugin. |
Project Key |
Required. Jira project key (for example, |
Version Name |
Jira version to be marked as released. |
UpdateIssues
Updates one or more Jira issues or add comments to them. When the procedure runs, the first issue key parameter is checked. If it is provided, the single Jira issue is updated. If JQL is provided, the procedure queries the issues and updates them, and then searches for the issues in the property. If no issues were found with the provided JQL, the procedure finishes and does not update any Jira issues.
The LinkIssues and UpdateIssues procedures can be used together to update issues that were mentioned in the source control logs. |
Input parameters
Parameter | Description |
---|---|
Configuration name |
Required. The previously defined configuration for the plugin. |
Property to Read Defects |
Path to the property, if the property containing the list of defects to update is something other than
If no issue key or JQL is provided, the procedure switches to compatibility mode. It parses the input property, updates the issue status, and adds a technical comment with the following text: |
Issue Key |
Issue key to update a single Jira issue. If this field is provided, the JQL and Property to Read Defects parameters are ignored. |
JQL |
Provide JQL to search for the issues to update. If this field is left empty, the procedure looks for issues to update in the Property to Read Defects parameter (backward compatibility logic is enabled). |
Summary |
Short description of the issue (for example, |
Issue Type |
Issue type (for example, |
Assignee Name |
Person assigned to the Jira issue. You must provide the sign in name for an existing user (for example, |
Labels |
Comma-separated list of issue labels (for example, |
Affects Version(s) |
Comma-separated list of affected versions (for example, |
Description |
Full description of the issue, steps to reproduce, and expected results. Jira markup can be used here, for example:
Note that this works in a job context. For a pipeline, use For more information, refer to the Jira Formatting documentation. If several issues are queried, they are not updated and the procedure fails. The value from this field overrides the current description of the issue. |
Additional Parameters |
Any additional parameters to be specified for the Jira issue in JSON format. The parameters are placed under the Refer to the Jira REST API for supported parameters for creating an issue API. Example formats for this parameter are:
|
Transition Action |
Action to change issue status (for example, To get a list of available transitions for a particular issue, use Get Transitions REST API call. An example call:
|
Comment |
Comment to add to the found issues. If left blank, no comment is added. Jira markup can be used here. For example:
For more information, refer to the JIRA Formatting documentation. |
Add Field Values |
If selected, issue fields that can contain multiple items (for example, |
Result Property |
Property sheet or property name to store results. |
Result Format |
Format to store results, JSON or property sheet. Retrieved Jira issues are saved under this property. For more information, refer to Result format. |
Create Summary Link? |
If selected, a report with a summary and links are attached to the pipeline summary and job summary. |
Summary link property |
Property to store a report is generated and attached to the pipeline summary and job summary. The default value is |
Summary link title |
Title for a link to download a report. The default title is |
Configure the CollectReportingData procedure
The CollectReportingData procedure retrieves issues from Jira, groups them by the specified fields, creates the report payload and sends the payload into the reporting system.
Associate issues with a Jira feature or defect object
To associate issues with a Jira feature or defect object, the Field mapping parameter must be specified.
Field mapping has a format of jiraField:featureField
, where jiraField
is the name of the field in Jira (for example, projectName
) and the featureField
is the name of the field in the Jira feature or defect (for example, releaseProjectName
). The most common fields are:
-
projectName
: The name of the Jira project. -
statusName
: String representation of the issue status (for example,Opened
). -
versions.name
: String representation of Fix Versions field (for example,8.0
). -
epicName
: The name of the bound Epic (for example,Reporting
). -
issueTypeName
: String representation of the issue type (for example,Bug
).
Field names are case-insensitive. All available Jira fields can be seen in the procedure logs, but some of them have a type that is not compatible with mappings. If you need special handling, use transformScript with an additional, third, parameter. |
Custom fields that you define appear in the list of Jira fields based on the custom field name, using lowercase characters and no spaces. In this example, if the custom field is:
{"id": "customfield_10100", "key": "customfield_10100", "name": "TEST Custom Field", "custom": true, ...
It appears as testcustomfield
in the list of Jira Fields.
Retrieve summary data
To retrieve summary data, like the sum of storyPoints
in the grouped issues, the Fields to aggregate parameter must be specified. If the parameter is left empty, each issue is sent as a separate report payload. Any field with numeric data can be used in this parameter. The most commonly used fields are:
-
storyPoints
: Story points for the issues (stories, epics). -
timeEstimate
: Estimated time for the issue.
A refined issue can look like the following:
$VAR1 = { 'acceptancecriteria' => undef, 'aggregateprogressprogress' => '', 'aggregateprogresstotal' => '', 'aggregatetimeestimate' => undef, 'aggregatetimeoriginalestimate' => undef, 'aggregatetimespent' => undef, 'assigneeactive' => 'true', 'businessvalue' => undef, 'components' => [], 'created' => '2017-07-10T08:52:04.000-0700', 'creatoractive' => 'true', 'creatorname' => 'name', 'customer' => undef, 'customeremail' => undef, 'description' => undef, 'docimpactid' => '10850', 'docimpactvalue' => 'Not Set', 'duedate' => '2017-07-12', 'engcategory' => undef, 'environment' => undef, 'epic/theme' => undef, 'epiclink' => undef, 'fixversions' => [ { 'archived' => bless( do{\(my $o = 0)}, 'JSON::XS::Boolean' ), 'id' => '16703', 'name' => '1.0.0', 'released' => $VAR1->{'fixversions'}[0]{'archived'}, 'self' => 'http://some-jira.company.com/rest/api/2/version/16703' } ], 'flagged' => undef, 'id' => '80952', 'installerimpactid' => '10851', 'installerimpactself' => 'http://some-jira.company.com/rest/api/2/customFieldOption/10851', 'installerimpactvalue' => 'Not Set', 'issuelinks' => [], 'issuetypedescription' => 'Test jira', 'issuetypeiconurl' => 'http://some-jira.company.com/images/icons/issuetypes/story.png', 'issuetypeid' => '9', 'issuetypename' => 'Story', 'issuetypeself' => 'http://some-jira.company.com/rest/api/2/issuetype/9', 'issuetypesubtask' => '', 'key' => 'ECJIRA-12', 'keywords' => undef, 'labels' => [], 'lastviewed' => '2017-07-13T06:37:53.720-0700', 'milestoneid' => '10872', 'milestoneself' => 'http://some-jira.company.com/rest/api/2/customFieldOption/10872', 'milestonevalue' => 'Unassigned', 'operatingsystem' => [ { 'id' => '10031', 'self' => 'http://some-jira.company.com/rest/api/2/customFieldOption/10031', 'value' => 'All' } ], 'perforcejob' => 'true', 'priorityiconurl' => 'http://some-jira.company.com/images/icons/P2.gif', 'priorityid' => '2', 'priorityname' => 'P2', 'priorityself' => 'http://some-jira.company.com/rest/api/2/priority/2', 'progress' => '', 'progresstotal' => '', 'projectcategoryid' => '10030', 'projectcategoryname' => 'Sample project', 'projectcategoryself' => 'http://some-jira.company.com/rest/api/2/projectCategory/10030', 'projectid' => '12770', 'projectkey' => 'ECJIRA', 'projectname' => 'Jira Plugin', 'projectself' => 'http://some-jira.company.com/rest/api/2/project/12770', 'rank' => '1|i034ev:', 'rank(obsolete)' => '9223372036854775807', 'releaseversionhistory' => undef, 'reporteractive' => 'true', 'reporterdisplayname' => 'Someone', 'reporteremailaddress' => 'someone@mycompany.com', 'reportername' => 'Someone', 'resolution' => undef, 'resolutiondate' => undef, 'self' => 'http://some-jira.company.com/rest/api/2/issue/80952', 'severityid' => '10003', 'severityself' => 'http://some-jira.company.com/rest/api/2/customFieldOption/10003', 'severityvalue' => 'normal', 'sprint' => undef, 'statuscategorycolorname' => 'blue-gray', 'statuscategoryid' => '2', 'statuscategorykey' => 'new', 'statuscategoryname' => 'New', 'statuscategoryself' => 'http://some-jira.company.com/rest/api/2/statuscategory/2', 'statusdescription' => 'The issue is open and ready for the assignee to start work on it.', 'statusiconurl' => 'http://some-jira.company.com/images/icons/statuses/open.png', 'statusid' => '1', 'statusname' => 'Open', 'statusself' => 'http://some-jira.company.com/rest/api/2/status/1', 'subtasks' => [], 'summary' => 'Sample jira with delivery date', 'timeestimate' => undef, 'timeoriginalestimate' => undef, 'timespent' => undef, 'updated' => '2017-07-13T06:37:53.000-0700', 'versions' => [], 'votes' => '', 'voteshasvoted' => '', 'votesself' => 'http://some-jira.company.com/rest/api/2/issue/ECJIRA-12/votes', 'watchesiswatching' => 'true', 'watchesself' => 'http://some-jira.company.com/rest/api/2/issue/ECJIRA-12/watchers', 'watcheswatchcount' => '1', 'workratio' => -1 };
To put a top-level field into a payload, simply use its name (for example, projectkey:projectKey
). To put a value from an array, use the dot syntax: operatingsystem.value:operatingSystem
, which results in {"operatingSystem": "All"}
in the payload.
Result format
Several procedures support saving results and the list of issues that were created, updated, or queried in two formats: JSON or a property sheet.
If Property Sheet is the selected format, the result is saved in the following format:
%property% /issues /key -> MYJIRA-1 /summary -> "Some summary" /type -> Bug /status -> Closed /assignee -> Admin /issueKeys -> MYJIRA-1
If there are no issues to save, the property is not created.
Here is the sample:
If JSON is selected, the raw JSON response from Jira API is saved. For example:
[ { "fields" : { "versions" : [], "labels" : [], "duedate" : null, "timespent" : null, "timeoriginalestimate" : null, "updated" : "2017-10-24T00:32:32.000+0000", "description" : null, "lastViewed" : "2017-10-25T18:17:39.778+0000", "status" : { "name" : "To Do", "description" : "", "statusCategory" : { "name" : "To Do", "key" : "new", "colorName" : "blue-gray", ... } }, "creator" : { "name" : "admin", "emailAddress" : "someone@mycompany.com", "key" : "admin", ... }, "aggregatetimespent" : null, "resolution" : null, "issuelinks" : [], "summary" : "my summary", "aggregatetimeoriginalestimate" : null, "assignee" : { ... }, "resolutiondate" : null, "fixVersions" : [], "subtasks" : [ { ... } ], "issuetype" : { "name" : "Sub-task", "description" : "The sub-task of the issue", .... }, "aggregateprogress" : { ... }, "components" : [], "timeestimate" : null, "progress" : { ... }, "watches" : { ... }, "project" : { ... }, "workratio" : -1, "aggregatetimeestimate" : null, "priority" : { ... }, "reporter" : { ... }, "created" : "2017-10-24T00:32:32.000+0000", "environment" : null, "votes" : { ... } }, "id" : "10100", "self" : "http://myinstance/rest/api/2/issue/10100", "key" : "TEST-2" } ]
Here is an example of the full JSON.
Update issues based on source control logs
-
Create a procedure with three steps:
-
The first steps checks out code from Git.
-
The second step runs the LinkIssues procedure.
It reads the property
/myJob/ecscm_changeLogs
, which is to be set by the previous step, and writes its results into the/myJob/issueLinks
property sheet. -
The third step runs the UpdateIssues procedure:
It reads issue keys from the property
/myJob/issueLinks/issueKeys
, which is to be set by the previous step and uses these keys as a part of JQL.
-
-
Run the procedure:
-
View the logs:
-
View the report:
Jira plugin release notes
2.3.0
-
Added the option to customize properties and titles for attached reports in the pipeline summary.
-
Fixed an issue when the plugin could not assign a new ticket or update an existing one to a user in Jira Cloud.
-
Fixed an issue with processing redirection HTTP response status codes.
2.1.2
-
Fixed an issue with the resolvedOn field not being retrieved for DevOps Insight configurations created for the Release Command Center (RCC).
2.1.1
-
Fixed parsing assignees received from Jira Cloud.
-
Fixed the Ignore SSL errors flag used for reporting.
2.0.1
-
Set the minimum required server version to CloudBees CD/RO 10.3, to avoid issues with the older Perl versions.
2.0.0
-
The plugin is switched to Perl version 5.31. No backward compatibility with releases prior 10.3. Starting from this release, a new agent is required to run this plugin’s procedures.
1.9.0
-
Added support for the Create New Version procedure.
-
Added support for the Mark Version As Released procedure.
1.8.3
-
Fixed an issue that occurred where the UpdateIssue procedure did not work correctly in some environments with custom fields.
-
Updated the CreateIssues procedure to account for changes in Jira versions 8.4 and later.
1.8.2
-
Fixed a bug that could occur if the CollectReportingData procedure sent the incorrect configuration name in the DOIS payload.
1.8.1
-
Fixed an issue where the EditConfiguration procedure did not work properly in older environments.
1.6.8
-
Enhanced the CollectReportingData procedure to support the
transform()
method of receiving additional parameters via refined issue fields.
1.6.7
-
Added an error-resistant design for the PEM RSA private key handling, including:
-
Checking the correctness of the base64 key body.
-
Checking and correcting the beginning and ending markers.
-
Checking and correcting the number of pads.
-
-
Renamed to "CloudBees CD/RO".
1.6.5
-
Improved the CreateConfiguration procedure by adding support for checking connections, diagnostics, and capturing errors.
1.6.4
-
Enhanced the user experience for the CreateConfiguration and EditConfiguration procedures.
-
Updated the check connection logic due to changes in the Jira REST API.
1.6.2
-
Fixed a minor issue with the configuration form when the configuration was opened and a warning was displayed.
1.6.1
-
Renamed to "CloudBees".
-
Fixed an issue with lost output parameters for CloudBees CD/RO 9.0 that occurred upon upgrade or clean installation and the 9.0 output parameters were not created for the plugin’s procedures.
1.6.0
-
A new Add Field Values parameter has been added to the UpdateIssues procedure, to allow appending values for the
Labels
andVersions
fields.
1.4.0
-
Added support for the GetProjectVersions procedure, which returns one or more versions of a project based on different criteria.
-
Enhanced the GetIssues procedure to include an option to not save results to properties, which can be used for performance optimization or when query results are too large.
1.3.0
-
Added support for authentication to Jira using OAuth 1.0. Refer to the OAuth 1.0 Protocol for OAuth 1.0 and Atlassian REST API OAuth Configuration for the Jira implementation of OAuth.
-
Added the Field List to Save? parameter to the GetIssues procedure to retrieve additional issue fields as part of the existing HTML report.
-
For better usability and consistency, optional procedure parameters no longer contain default placeholder values.
-
Fixed problems with the jiraids and jirareporturl output parameters.
-
The deprecated CreateIssue and UpdateIssue procedures have been removed.
1.2.0
-
Added support for HTTP proxies. If you use HTTP proxies, you can specify the proxy information (for example, the host, port and credentials) at the configuration level, and all procedures now use the HTTP proxy as secondary credentials for authentication.
1.1.4
-
Fixed the Jira URL in the issues report for URLs with path segments. For example, if the Jira endpoint is represented as
http://endpoint:port/jira
,jira
was omitted from the URL. -
Added support for certain Electric Flow 8.4 features. Changes include adding an icon for dashboards and the ability to create configurations inline.
1.1.3
-
Fixed reporting logic for processing fields with an
=
symbol. -
Enhanced the LinkIssues procedure to process issues with a summary longer than 255 characters.
-
For all plugins available with Electric Flow v8.3 and later:
-
Support has been added for rendering procedure parameters based entirely on configured form XMLs and the ability to manage plugin configurations inline as part of a process step or pipeline stage task.
-
Support has been added for the jiraids output parameter.
-
Support has been added for the jirareporturl output parameter is returned with a URL to the generated HTML reports.
-