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.
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this communityBoth 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.
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.
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
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.