I am facing an issue while integrating Apex program with Jira, Unable to set the specific Jira fields in it. My code looks like the following;
String jsonContent = res.getBody();
System.debug(jsonContent);
JSONParser parserJira = JSON.createParser(jsonContent);
while (parserJira.nextToken() != null) {
if (parserJira.getCurrentToken() == JSONToken.START_ARRAY) {
while (parserJira.nextToken() != null) {
JiraIssue jIssue = (JiraIssue)parserJira.readValueAs(JiraIssue.class);
if(c.CaseNumber.equals(jIssue.SFDCCaseNumber)){
c.Bug_Number__c = jIssue.BugNumber;
casesToUpdate.add(c);
//Mapping
String Description = parserJira.Description;
String Title = JSONContent.Title;
String SFDCCaseNumber = JSONContent.SFDC_Case_Number__c;
String BugNum = JSONContent.Issue_Number;
Title = c.Subject;
SFDCCaseNumber = c.CaseNumber;
Description = c.Description;
c.Bug_Number__c = BugNum;
}
}
}
}
This is not the full length code, and it parses JSON. Anybody can look into this issue, it would be a great help to complete my Salesforce Apex project ontime.
What errors do you get back when you try to post this?
I'm having a little trouble figuring out how to reference/set the specific Jira issue fields.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm having trouble reading your code, I can't see quite what it is building and sending to Jira to reference it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.