• abhishek g 16
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I am having a issue in Trigger. Its unable to fire..

trigger CreateWithJIRAIssue on Case (after insert) {
List<Case> escCases = new List<Case>();
  

   for (Case c : Trigger.new){

    // all the cases that have status as abc' is added to a list called xCases
    if(c.Status == 'abc'){
     xCases.add(c);
    }
   }
   if(xCases != null && xCases.size()>0){
    // now iterate over the selected cases and call the web service
    for(Case c : xCases){
     //call webservice
     system.debug('inside case ' + c.CaseNumber);
     //Define parameters to be used in calling Apex Class
     String jiraURL = 'http://jira';
     String systemId = '2';
     String objectType ='Case';
     String objectId = c.id;
     String projectKey = 'LEV';
     String issueType = 'BUG';
     System.debug('\n\n status is escalated');
     //Execute the web service call
     
     JIRAConnectorWebserviceCallout.CreateIssue(jiraURL, systemId ,objectType,objectId,projectKey,issueType);
    }
   }
  }
}
}
I am having a issue in Trigger. Its unable to fire..

trigger CreateWithJIRAIssue on Case (after insert) {
List<Case> escCases = new List<Case>();
  

   for (Case c : Trigger.new){

    // all the cases that have status as abc' is added to a list called xCases
    if(c.Status == 'abc'){
     xCases.add(c);
    }
   }
   if(xCases != null && xCases.size()>0){
    // now iterate over the selected cases and call the web service
    for(Case c : xCases){
     //call webservice
     system.debug('inside case ' + c.CaseNumber);
     //Define parameters to be used in calling Apex Class
     String jiraURL = 'http://jira';
     String systemId = '2';
     String objectType ='Case';
     String objectId = c.id;
     String projectKey = 'LEV';
     String issueType = 'BUG';
     System.debug('\n\n status is escalated');
     //Execute the web service call
     
     JIRAConnectorWebserviceCallout.CreateIssue(jiraURL, systemId ,objectType,objectId,projectKey,issueType);
    }
   }
  }
}
}