- Create Projects from Accounts
- Create Versions from Opportunities
- Sync JIRA Issues with Cases
Learn how to build this project by following this tutorial: https://youtu.be/0mF2PZuyWjw
You can install with the SF CLI:
sf package install --package 04tQl0000008iGnIAI --target-org your-org
Or use the install links:
The integration uses Basic Authentication in Jira to create the authentication. We also need to store this information in a named credential.
We can get the Salesforce Named Credential by installing the following package:
sf package install --package 04tQl0000008iIPIAY --target-org your-org
WARNING - Installing this package will override any existing Jira Named Credentials in your org.
We can get the Jira credentials by:
- Get the API Token
- Inside Salesforce, go to Setup -> Named Credential. Update the
your-domain
inside the Jira Named Credential, update the URL to your JIRA Domain - Inside the
JIRA External Credential
, update the parameter to your username and api token from step 1. - Inside the
Jira Integration
permission set, add theJira_External_Credential - Jira
External Credential Principal Access. - Assign the
Jira Integration
permission set to any user that will use this integration.
The following can be added to page layouts for the given objects
Label | Type |
---|---|
JIRA User Id | Custom Field |
Get JIRA Id | Custom Link |
Label | Type |
---|---|
Jira Error | Custom Field |
Jira Project Id | Custom Field |
Jira Project Key | Custom Field |
Jira Project Lead | Custom Field |
Jira Project Name | Custom Field |
Push Project to JIRA | Custom Action (VisualForce) |
Create Project | Custom Action (LWC) |
Label | Type |
---|---|
Jira Version Id | Custom Field |
Jira Project Id | Custom Field |
Jira Issue Id | Custom Field |
Jira Key | Custom Field |
Time Spent | Custom Field |
Hours Spent | Custom Field |
Label | Type |
---|---|
JIRA Fix Version Name | Custom Field |
Jira Project Id | Custom Field |
Jira Version Id | Custom Field |
Jira Key | Custom Field |
The JIRA User Id is essential for creating new Projects, as it is used for a project lead. On a user record page in setup, click the Get JIRA Id
link, and the JIRA User Id
will be populated based on the email of the user.
To create a project with the Create Project
wizard, add the action to the page layout, then fill out the data and save. Ensure the the Check Key
button is pressed to ensure no duplicate data is created.
Create and updates to projects can be done using the Push Project to JIRA
action. This will overwrite data inside JIRA with the following fields:
To create a project version, ensure the the opportunity's account has been synced as a project, then use the Create Jira Version
action. This will use the data inside the following fields:
To sync every issue in JIRA as a case, run the following code inside Execute Anonymous:
System.enqueueJob(new JIRAIssueQueueable(0, 0, 50, 0));
To sync issue data overnight, we can schedule the following batch class:
System.schedule('JIRA Issue Sync', '0 0 0 * * ?', new JIRAIssueBatch());
This will sync issues as cases every day at midnight.
- Authenticate with Jira and Salesforce
- Create Project from an account
- Implement GET
/rest/api/3/project/{projectIdOrKey}
- POST
/rest/api/3/project
- Create project creation wizard
- Get user Id (unhardcode)
- Create a fix version from opportunity
- Sync issues from jira to SF
- Sync work logs from Jira -> SF
- Fix JSON Parse error
- Add issue one time sync
- Add issue nightly sync
- Distribute via unlocked packages
- Write Documentation on how to use project