function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sftechlearnersftechlearner 

Salesforce - JIRA connector

Hi ,

 

Can anyone make recommendations of the tools available to connect Salesforce and JIRA?( This is to integrate Salesforce.com cases and JIRA issues)

 

Thanks in advance!!!

Satish_SFDCSatish_SFDC
There a some apps in the AppExchange which help you connect JIRA and Salesforce.

Go to this appexchange link and search for JIRA
https://appexchange.salesforce.com/

You could also search in google for other Salesforce to JIRA connectors.

If you would like to develop your own integration between, there is the Salesforce API, which JIRA can use to connect.
SOAP API: http://www.salesforce.com/us/developer/docs/api/index.htm
REST API: http://www.salesforce.com/us/developer/docs/api_rest/

Before developing the integration yourself, i would recommend checking in the AppExchange or google to see if there are existing apps. In case they dont meet your requirements, you can then go about creating your own integration.

Hope this helps!
Regards,
Satish Kumar
Please mark my answer as a solution if it was helpful so it is available to others as a proper solution.
If you felt I went above and beyond, please give me Kudos by clicking on the star icon.
sfScottsfScott

We used ServiceRocket (was Customware's) JIRA / SF connector with success.  Works OK if you want to connect cases to JIRA issues but there are limitations.  Great thing about the Atlassian tools is you can get evaluation licenses to try it out.  Just be warned that once you get started you might get addicted...

Sanjiva NathSanjiva Nath
You may want to check out zAgileConnect on AppExchange which provides fairly tight integration between Salesforce and JIRA.  You can create/link JIRA issues from Salesforce, view issue details within Salesforce pages, share comments/attachments between the two apps and also track updates on Chatter and JIRA Activity feeds.  
Muralidhar S (Salesforce)Muralidhar S (Salesforce)
No external apps required. You can utilize the REST API feature of JIRA which returns response in JSON. Utilize the HttpRequest and HttpResponse methods in Apex to GET/POST the REST URLs and JSONParser to parse the JSON Response. I have done it and the challenging part is to convert the JSON stream to a class structure based upon what fields you are looking to fetach from JIRA. Let me know if you require additional details. Thanks 
Sreekanth KalluruSreekanth Kalluru
Hi Muralidhar,

Even i am trying to integrate   Salesforce to JIRA and JIRA to Salesforce using REST API. But i am not finding much information on how to consume a service in JIRA to create issue from a Salesforce REST API.

Can you pls provide some insights and any useful info that you have. 
Muralidhar S (Salesforce)Muralidhar S (Salesforce)
Sreekanth,
You can use the below code to get the JSON response from Jira REST URL
 
HttpRequest req = new HttpRequest();
req.setEndpoint(<Jira's REST Url>);
req.setMethod('GET'); // POST if you want to post data to Jira
HttpResponse res = http.send(req);

Refer here (https://developer.atlassian.com/jiradev/jira-apis/jira-rest-apis) to form the REST url. Sample url would look like http://localhost:2990/jira/rest/api/2/issue/10009. Instead of localhost it should be domain name your organization has choosen for Jira. 

Then you need to parse the JSON response. Loop through it as shown below and deserialize it (parserJira.readValueAs(issue.class)).
 
String JSONContent = res.getBody();
JSONParser parserJira = JSON.createParser(JSONContent);
while (parserJira.nextToken() != null) {
 if (parserJira.getCurrentToken() == JSONToken.START_ARRAY) {
  while (parserJira.nextToken() != null) {
   issue jiraIssue = (issue)parserJira.readValueAs(issue.class);
    // Your other code
  }
 }
}
issue is a class version of the JSON. E.g if the json structure that is returned is of the form {issue:{field1:val1,field2:val2}}; then the class would be,
 
public class issue{
 public string field1;
 public string field2;
}

For nested json structure the class structure too have to be created accordingly. Once the json response is deserialized you can access the values with dot notation on the class object as usual:
 
....

String issue1 = jiraIssue.field1;

....

Let me know if you need more information. Thanks


 
Ciaran GallagherCiaran Gallagher

Muralidhar - Thank you for the code Snippet. But how do you handle the Authentication? Are you passing the user:pass, or using Oauth?
Muralidhar S (Salesforce)Muralidhar S (Salesforce)
@Ciaran Gallagher

I have passed the credentials in the JIRA REST URL. I tried using the OAuth but was not able to authenticate for which I have posted a question on the forums as well. The same encrypted credentials and protocol was however working when used with Postman client in Chrome browser.
Rahul YadavanshRahul Yadavansh

Hi Muralidhar,

I wrote the REST API for this but the "res.getBody()" method is returning  <!doctype html>.
I'm in fix can you please help me out and also wanted to know if we need to make any changes in our JIRA org ?

Thanks
Rahul Kumar

Muralidhar S (Salesforce)Muralidhar S (Salesforce)
Hi Rahul,

Have you checked the response for the URL by hitting the same in the browser because getBody() function simply fetches the body of the HTML response. So if it is coming as <!doctype html> then indeed the response of the url you are hitting should be sending the html response. Please check and post the response here if possible else share the url if it open. Thanks
pavan kumar 728pavan kumar 728
Hi Muralidhar,

I tried to get the data of Comments field to salesforce from Jira but data is not synchronising,can you send the code snippet to sync the Comment to salesforce.
Uday rajUday raj

Hi Muralidhar,

I am unable to Update an Issue in Jira from Salesforce,came across such error 
|USER_DEBUG|[48]|DEBUG|ResponseJsonString System.HttpResponse[Status=Bad Request, StatusCode=400].Can you help me out..!!

 

Thanks 
Uday
 

Muralidhar S (Salesforce)Muralidhar S (Salesforce)
@pavan kumar 728

I haven't tried fetching the comments from JIRA, but herewith sharing the Jira documentation for the same

https://docs.atlassian.com/jira/REST/latest/#api/2/comment/{commentId}/properties-getPropertiesKeys

@Uday raj

As per the documentaion StatusCode 400 is returned if the comment key or id is invalid
Uday rajUday raj
Thanks muralidhar for your response, the issue was framing  JSON input string.
Muralidhar S (Salesforce)Muralidhar S (Salesforce)
Hi All,
I have written a series of blog posts for Salesforce-Jira integration. Sharing the same here so that if someone lands up here then he/she might find some help. Do let me know if you have any suggestions/feedback. Thanks

https://inteygrate.com/salesforce-jira-integration/ (https://inteygrate.com/salesforce-jira-integration/" target="_blank)
MalakondaiahMalakondaiah
Hi Murali,

I did the salesforce to JIRA Integration using Rest Api.
How to pull the Opportunity related list are  "partners, competitors and notes" from salesforce to JIRA?
Do you  sample code for this?

Thanks,
Kumar
 
Arfat PathanArfat Pathan
Hi,
There is an Awesome app on appexchange for Integration called " ActionHub". It just not Integrate JIRA With salesforce. but also integrate other platforms too. check this out. 
https://appexchange.salesforce.com/results?keywords=actionHub
Michael RotterMichael Rotter
@Muralidhar Sampathirao 10,

I'm trying to integrate certain SFDC case fields into crresponding Jira issue fields. My instance of Salesforce has a "Create Jira Issue" button, but it has no functionality. I'm attempting to add functionality so that when the button is pressed, the SFDC "Case Synopsis" gets copied into the Jira "Description" field, the SFDC "Subject" gets copied into the Jira "Title" field, the Jira "Ticket Number" gets copied into the SFDC "Bug Number", and the SFDC "Bug Status" is updated whenever the Jira "Status" gets updated. I want to use the Salesforce REST API but am very new to this and a little lost.

Any help is greatly appreciated.
Sergii GrushaiSergii Grushai
I investigated existing Jira connectors some recently for one of our clients, and recognized that usually a client would involve Salesforce development team to write few more customizations on top of existing connectors. Our Forceoft team participated in a few Salesforce Jira Integrations projects already. just to draw your attention to some of them 
- Salesforce Jira integration (https://www.forceoft.com/projects/salesforce-jira-integration/)
- Sage Salesforce Integration with Jira (https://www.forceoft.com/projects/sage-salesforce-integration-jira/)
Nabamita DeNabamita De

For Salesforce Jira integration, pre-built solution like connectors help a lot. They offer faster deployment which increases productivity. Companies like DBSync provide Salesforce Jira integration solution and implemented such solution to a number of clients successfully. You can find resources to know more about the solution here:

Salesforce - Jira Integration ( https://www.mydbsync.com/product/jira )

Sergii Grushai 25Sergii Grushai 25
Please have a look at the blog: 7 Ways to Integrate Salesforce and Jira (https://www.peeklogic.com/article/7-ways-to-integrate-salesforce-and-jira/)

also Peeklogic Jira Connector (https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000FMdJ7UAL) has apps on both sides - on AppExchagne and on Atlassian, which makes it real time and 2-way.