Jira ITSM Integration
The Jira ITSM integration with FlexDeploy requires a user with permission to create Change Requests and Incidents, and an API token. The steps in Jira are shown below.
Preparing for JIRA ITSM Integration with FlexDeploy
You need to create an API token for use in FlexDeploy. The API token will be encoded using base64 before used in the request to get change request or create any new request
Log into Jira ITSM
Go to Account Settings
Click Security
Click Create and Manage Tokens
Here, you can create a new API token, and use this token for your Jira ITSM instance in FlexDeploy.
Permissions
The user configured in FlexDeploy must have permission to access and create tickets. You can view and update permissions for your Jira ITSM project from Project Settings → Permissions.
From this menu, you can view and change which users and roles can create issues as needed. To view the role assigned to each user, go to Project Settings → Team.
After configuring this user in Jira ITSM, go to FlexDeploy and create a Jira ITSM instance to start using the integration.Â
Create Change Management Instance
Property Name | Property Code | Required | Description |
---|---|---|---|
Jira URL |
| Yes | Jira URL (http://myjira.atlassian.net) |
Jira User |
| Yes | Jira User Name |
Jira Auth Type |
| No | Authentication method for connecting to Jira. Defaults to BasicAuth. Useful for connecting to On-premise instances of Jira where basic authentication will not work with username and password or API token alike. In those cases authentication type must be set to the BearerToken and API token provided. If AuthType is BearerToken, then |
Jira API Token |
| Yes | API token for Jira Note that encrypted properties are stored in Credential Store (Local or External) and can be configured using Edit button next to credential name drop down. Alternatively, you can reuse single credential for multiple properties also, in which case you should name that credential appropriately. |
Jira Ticket URL Pattern |
| Yes | The URL to open Jira ITSM and navigate to the change ticket associated to the project workflow execution
|
Jira GET Rest API Pattern |
| Yes | Jira Rest API URL Pattern for a GET request
|
Jira POST Rest API Pattern |
| Yes | Jira Rest API URL pattern for creating a change ticket
|
Approved Check Script |
| No | A Groovy expressions which determines whether a task for the change ticket is approved or not. The expression must return a boolean, and has access to the following variables:
If the Approved Check Script is left blank, the default implementation checks the status of the ticket to determine if it's approved. Statuses of awaiting implementation, implementing, and completed are considered approved and return true. Default CheckTICKET.fields.status.name == 'Awaiting implementation' || TICKET.fields.status.name == 'Implementing' || TICKET.fields.status.name == 'Completed' Example that checks custom field value specific to target environment(TICKET.fields.customfield_10107.status == 'UATApproved' && FD_ENVIRONMENT_CODE='UAT') || (TICKET.fields.customfield_10107.status == 'PRODApproved' && FD_ENVIRONMENT_CODE='PROD') If you want to see values that can be used, enable |
Rejected Check Script |
| No | A Groovy expressions which determines whether a task for a change ticket is rejected or not. The expression must return a boolean, and as has access to the following variables:
If the Rejected Check Script is left blank, the default implementation checks the status of the ticket to determine if it's rejected. Statuses of declined, canceled, and failed are considered rejected and return true. |
Additional Info Script |
| No | A Groovy expression which determines additional information to add to an external approval when it is approved or rejected. The expression must return a Map<String, String> and have an entry with the key of "notes" for the value to get added to external approval as a task note. Script has access to the following variables:
|
Don't poll |
| No | Disable automatic polling (every minute) of Jira tickets for status changes. The default value is false, which means polling will occur. Only check this box if you are using the FlexDeploy REST API to communicate ticket approval/rejection. |
Jira ITSM Available TICKET Variables
Within the script properties on the Jira ITSM Instance. The following values are available to you via the TICKET object to use in your script logic. For example, TICKET.project.summary would return the summary of the ITSM change.
Field Code | Display Name | Description | Data Type | Required |
---|---|---|---|---|
fields.summary | Summary | Summary of the change | String | Yes |
fields.project.key | Project Key | Key of project the change is in | String | Yes |
fields.issuetype.name | Issue Type | Type of issue for ticket | String | Yes |
fields.description | Description | Description for the change | String | No |
fields.priority.name | Priority | Priority of the change | String | No |
Linking Jira ITSM with FlexDeploy Deployments
If Auto Create Ticket is not enabled, then user must provided the Change Ticket number(s) for the deployment. See Link Change Ticket(s) with Deployments.
- style