• Priyada Anilkumar
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
I am trying to use this method for the Jira intyegration on after update trigger but it is not working JSFS.API.pushUpdatesToJira . I tried JSFS.API.createJiraIssue for after insert and it worked as expected. Can someone please advice what can be the issue?
Hello,

I had to create a simple Apex trigger for an integration between Salesforde and JIRA.  

trigger JIRA on Case (after update) {
    JCFS.API.pushUpdatesToJira();
}

However, I am lost in the test coverage part as this will not deploy since there are no tests.  Are the tests written directly in the trigger?  If so, what are some examples of how to test this?  

Thanks,
Matt
Hi,

I have created following APEX TRIGGER so that whenever a new job is created on SalesForce, a Task is created on JIRA CORE.

trigger JobTrigger on Contract (after insert, after update) {
    if (Trigger.isInsert && Trigger.isAfter) {
        JCFS.API.createJiraIssue('10000', '10100');
    }
    if (Trigger.isUpdate && Trigger.isAfter) {
        JCFS.API.pushUpdatesToJira();
    }
}

Now when I deploy this trigger from Sandbox to Production, I get following error:

Code Coverage Failure
Your organization's code coverage is 0%. You need at least 75% coverage to complete this deployment. Also, the following triggers have 0% code coverage. Each trigger must have at least 1% code coverage.
- JobTrigger

So can anyone help me how can I resolve this error that I can deploy this trigger to Production from Sandbox without any error?

Thanks,
Nitin.