More than 125,000 companies use JIRA in their daily work to track processes and workflow. Even more businesses rely on Salesforce system when it comes to customer relationship management.
Sometimes the work process in both systems - Salesforce and JIRA - becomes not very convenient. For example, you see a new Case in Salesforce. In order to process it, you have to switch to JIRA and create a task copy-pasting the information from the corresponding Salesforce Case. Not very fast and efficient, isn't it? And what about integrating Salesforce and JIRA?
For example, a Salesforce Case is automatically created as JIRA issue and assigned to someone who can solve it. Quick and convenient, without extra actions.
You may ask, is it possible to integrate Salesforce and JIRA?
How do I get already created JIRA tasks in Salesforce?
Let's dig into the questions step by step.
Yes, surely you can integrate Salesforce with JIRA. The reverse integration is possible as well. You also can get all the tasks from JIRA in Salesforce.
JIRA provides REST API for such work. The entire API list can be found in the official JIRA documentation.
JIRA REST API is protected with some restrictions, in order to proceed with the integration you have to authorize. Also, pay attention to the access issues. In case you do not have sufficient access rights in JIRA, you cannot view these objects while using JIRA REST API. The preferred authentication methods are OAuth and HTTP Basic (when using SSL). Other supported methods include HTTP cookies and trusted applications. We have used authorization with HTTP Basic.
Now, let's look at samples of some basic JIRA REST API methods that we need to integrate JIRA with Salesforce.
Case 1: Creating a task in JIRA via Salesforce
Before you start with the integration, you need to configure user access to the necessary projects and fields in JIRA. Otherwise, several errors may occur.
To create JIRA tasks (if JIRA settings allow you, then also to create subtasks): a request for endpoint JIRA API / rest / api / 2 / issue / bulk with the POST method allows you creating several tasks or subtasks in a single mass operation.
Note: The current API version is 2. However, there is a symbolic version, called also the latest, which resolves to the latest version supported by JIRA instance.
Note: Resource URIs have the following structure:
https: // <site-url> / rest / api / 2 / <resource-name>
If we need to create one task, use the request will look like / rest / api / 2 / issue POST method.
Note: In case of a JIRA error when calling the JIRA API, an error with HTTP code 400 and errorMessages in the body of the JSON response returns with the description of the error. It should be highlighted that in addition to some system fields (for example, errorMessages), the overall structure of the response for each request is different.
Case 2: Getting tasks from JIRA to Salesforce
Do you need to get tasks from a specific JIRA project? It is possible to get overall information about all the projects, as well as detailed information about a specific project.
To get all projects in JIRA, use the GET request / rest / api / 2 / project.
For detailed information about a project (tasks, description, etc.) use the HTTP method GET / rest / api / 2 / project / {projectIdOrKey}, where projectIdOrKey is the project id or project key. We recommend to store project information on a separate Salesforce object, such as Project e.g., and also keep there a project name and ProjectId.
Do you want to take advantage of the integration of JIRA with Salesforce, but do not feel up to dive in to the integration deepness? Try our ready-made solution Komunikado - a fully native Force.com app for a reversible issue, comment, and attachment sync.