Configure Jira user story integration
Perform the following procedure to configure your Jira integration options.
Avant de commencer
Role required: Scan Engine Admin (sn_se.scan_engine_admin)
- To enable the integration, you will need some details from the Jira project you want to integrate with the Scan Engine. From the project settings on your Jira board, find and make note of the following information:
- Project Key
- Work Item type
- Domain NameRemarque :You can get the domain name from your Jira URL. For example, if your URL is
companyname.atlassian.net/jira, then your domain name iscompanyname.
- To connect with your Jira project, you will also need an API token:
- Navigate to the following URL: https://id.atlassian.com/manage-profile/security/api-tokens.
- Select Create API Token, enter a name for the token, and then select Create.
- Once the token is created, copy and store it.
You will need it for the ServiceNow connection process.
Procédure
Jira integration script best practices
The following best practices are guidelines for creating Jira integration scripts.
- Unlike ServiceNow integrations, the Jira integration executes the field mapping script one time per finding. Source and Destination instances do not apply with this integration.
- The Project key and Domain name fields determine which Jira project you will be sending your payload to.
- When building a script, use data from the finding by extracting fields from the grFinding variable.
- You can create a description and summary to show in your Jira project. These will become core elements in your work item type. You may use other fields in the Jira project, but you will need an understanding of the Jira API to know the available fields.
- Some general fields you can use are:
- summary
- description
- project
- issuetype
These can be set by using this format:
payload = { 'fields':{ 'summary': text to display in the title, 'description': a description of the work item, 'project': { 'key': the project key}, 'issuetype': { 'name': a work item type: Epic, Story, Bug, Task, Sub-Task} }
There are several predefined variables available for Azure DevOps Integrations:
| payload | The field mapping to populate your Jira project. |
| grFinding | The glide record of the finding that sends the request. |
| workItemType | The work item type selected for Jira integration. |
| Key | The project key created for Jira integration. |