• Santhosh Reddy 54
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 5
    Replies
Hi Mates,

I have a requirement of two way integration of salesforce and jira through REST API,
when case is created/edited/deleted in salesforce and issue is created/edited/deleted in jira vice versa..

for this i did below code for first creation part

from sf to jira
created webservice callout to push records from salesforce to jira with trigger and prevented recusrtion with static varibale

from jira to sf
created webhook to call salesforce public class to insert record from jira to sf

now i can able to push records from sf to jira and jira to sf, But duplicate records inserting in sf and jira 

How to prevent this ,  can any one help me on this..




 
Hi Mates,

I need a help on integrating salesforce to jira and viceversa without any plugin/addon/third party tools in developer edition

i was trying to push case from salesforce to jira as issue, and it is done using Callout working fine
But also need to push issue from jira to salesforce as case for this i created a webhook and created apex rest api class in salesforce and made that class as public from site, see below class

@RestResource(urlMapping='/JiraToSFRestTest/*')
global class JiraTOSFRestTestController {
  @HttpPost
    global static String doPost(String issueId,String issueKey, String projectId, String projectKey) {
        Case CaseObj = new Case();
        CaseObj.Status = 'Working';
        CaseObj.Origin = 'Web';
        CaseObj.Subject = issueId+'->'+issueKey;
        CaseObj.Description = projectId+'->'+projectKey;
        insert CaseObj;
        return CaseObj.Id;
    }
}


webhook url look like this
https://SaleforceSiteURL/services/apexrest/JiraToSFRestTest?issueId=${issue.id}&issueKey=${issue.key}&projectId=${project.id}&projectKey=${project.key}

I am executing this rest class from workbench then it is working fine but how to call this rest api class directly without login into salesforce from jira webhook

Don't know how to impletement can any one help on this with step by step preocedure please

Awaiting your responce
Hi Mates,

I have a requirement of two way integration of salesforce and jira through REST API,
when case is created/edited/deleted in salesforce and issue is created/edited/deleted in jira vice versa..

for this i did below code for first creation part

from sf to jira
created webservice callout to push records from salesforce to jira with trigger and prevented recusrtion with static varibale

from jira to sf
created webhook to call salesforce public class to insert record from jira to sf

now i can able to push records from sf to jira and jira to sf, But duplicate records inserting in sf and jira 

How to prevent this ,  can any one help me on this..




 
Hi Mates,

I need a help on integrating salesforce to jira and viceversa without any plugin/addon/third party tools in developer edition

i was trying to push case from salesforce to jira as issue, and it is done using Callout working fine
But also need to push issue from jira to salesforce as case for this i created a webhook and created apex rest api class in salesforce and made that class as public from site, see below class

@RestResource(urlMapping='/JiraToSFRestTest/*')
global class JiraTOSFRestTestController {
  @HttpPost
    global static String doPost(String issueId,String issueKey, String projectId, String projectKey) {
        Case CaseObj = new Case();
        CaseObj.Status = 'Working';
        CaseObj.Origin = 'Web';
        CaseObj.Subject = issueId+'->'+issueKey;
        CaseObj.Description = projectId+'->'+projectKey;
        insert CaseObj;
        return CaseObj.Id;
    }
}


webhook url look like this
https://SaleforceSiteURL/services/apexrest/JiraToSFRestTest?issueId=${issue.id}&issueKey=${issue.key}&projectId=${project.id}&projectKey=${project.key}

I am executing this rest class from workbench then it is working fine but how to call this rest api class directly without login into salesforce from jira webhook

Don't know how to impletement can any one help on this with step by step preocedure please

Awaiting your responce