You need to sign in to do that
Don't have an account?
Lillian Co 9
Salesforce - JIRA Cloud
Hi, attempting to create a trigger to create JIRA ticket when a checkbox is checked; Create_Infra_Ticket__c
trigger insertCase on Opportunity (after insert) {
for (Opportunity opportunity : Trigger.new) {
if(Create_Infra_Ticket__c == true){
JCFS.API.createJiraIssue('JIRA PROJECT ID', 'JIRA ISSUE TYPE ID');
}
}
}
Really appreciate anyone that can help !
trigger insertCase on Opportunity (after insert) {
for (Opportunity opportunity : Trigger.new) {
if(Create_Infra_Ticket__c == true){
JCFS.API.createJiraIssue('JIRA PROJECT ID', 'JIRA ISSUE TYPE ID');
}
}
}
Really appreciate anyone that can help !
I trust you are doing splendidly and enjoying the season!
You need to, respectively, hardcode the Jira project id and Jira issue type id. You can get this values from the Jira REST API.
Please refer to the below links which might help you.
https://docs.servicerocket.com/salesforce-jira/administrator-guide/automating-your-integration/configuring-automatic-jira-issue-creation-from-salesforce
https://confluence.atlassian.com/jirakb/how-to-get-project-id-from-the-jira-user-interface-827341414.html
https://confluence.atlassian.com/display/JIRA050/Finding+the+Id+for+Issue+Types
https://developer.atlassian.com/cloud/jira/platform/rest/
I hope it helps you.
Kindly let me inform if it helps you and close your query by marking it as solved so that it can help others in future.
Thanks and Regards,
Khan Anas
Error: Compile Error: Variable does not exist: Create_Infra_Ticket__c at line 3 column 12
The field is on the opportunity
Please modify if condition like below:
I hope it helps you.
Kindly mark this as solved if the information was helpful.
Thanks and regards,
Khan Anas