2

I am new to Salesforce with JIRA integration. I have read about them but I have not found any proper documentation supporting the Integration.

Please suggest.

5

Both have an API. You can either have callout to Jira from salesforce with Apex or put middleware in between (I personally like dell boomi a lot for these things, it comes with out of the box connectors for both Salesforce and Jira).

I'm not sure whether jira is extendable/customizable so it may also be possible to call out to salesforce from Jira. Much will depend on how extensive you want this integration to be.

Jira API: https://docs.atlassian.com/software/jira/docs/api/REST/latest/ Making HTTP Callouts from Apex: http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_restful_http.htm

Your question is quite broad, I'd recommend you put some more effort into reading into this,and trying to build something. When you get stuck with specific problems, you can post more questions.

  • I've used JIRA Agile (formerly the Grasshopper plugin or however it was called). You can hook up Eclipse's Mylyn plugin to JIRA to sync tasks - very handy to store the "context" (which classes, pages, workflows...) had to be modified to develop the features of Task #123. But I agree - it's a very broad question, no idea if that was the intent :) – eyescream Jun 3 '14 at 8:57
3

Little late but there are integrations available for Salesforce and JIRA. Take a look at the Atlassian Marketplace and do a quick search for Salesforce.

I am from ServiceRocket and we have our Connector for Salesforce and JIRA. We have documentation for it and run a weekly webinar series on it if you would like more information.

  • Used your Service rocket for integrating Salesforce to Jira. I had copied your all the code into my SF. But I am getting error, please find the below URL’s & error 1) docs.servicerocket.com/display/CFSJ/Apex+Class+Parent+Code Error : System.AssertException: Assertion Failed: Expected: Basic cHVuZWV0Lm1hbGlrOm1AbGlrOTMxTU0=, Actual: Basic eW91ckpJUkF1c2VybmFtZTp5b3VySklSQXBhc3N3b3Jk – Nandu Raja Aug 25 '15 at 18:00
-1

I am from Grazitti, and we offer Salesforce-Jira connector that is Salesforce native. It has no user-defined limit and is easy to setup.

  • This post conforms to the guidelines in the help center about disclosure, so I will not delete it as spam. – Adrian Larson May 2 '18 at 16:47
-2

I know its late but for someone who lands up here while searching for Salesforce-Jira integration. We 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 chosen 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. There is a tool Json2Apex to map a JSON response to Apex Class. Once the json response is deserialized you can access the values with dot notation on the class object as usual:

....

String issue1 = jiraIssue.field1;

....

For a detailed setup and explanation along with code you can refer this post

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.