Integrating CodeScene with Jira
Integrating CodeScene with a project management (PM) tool like Jira allows you to retrieve cost and work type trends from your projects. This data is used to allocate costs to hotspots and detect trends in delivery performance, such as:
Planned vs Unplanned costs
Batch sizes
Delivery lead times
Below is a step-by-step guide to set up the Jira integration in CodeScene.
1. Navigate to PM Data Integration
Go to your Project Configuration in CodeScene.
Click on the PM Data Integration.
2. Select Jira
From the list of available PM tools, select Jira.
Enter the Jira API URL.
Example:
https://arnelacs.atlassian.net
3. Enter Jira API Credentials
For Jira Cloud:
Jira API Credentials: Enter your Jira user email address.
Jira API Password: Enter your Jira API token.
For Jira Server:
Jira API Credentials: Enter your Jira username. Leave blank if using a Personal Access Token.
Jira API Password: Enter your Jira password or Personal Access Token.
4. Create a Jira API Token
Follow these steps to generate a new API token in Jira:
Click your profile image in the top-right corner → Account Settings.
Navigate to:
Atlassian account settings → Security → API tokensOr go directly: https://id.atlassian.com/manage-profile/security/api-tokens
Click Create and manage API tokens → Create API token.
Enter a descriptive name, e.g.,
CodeScene Integration.Under Expires on, select an expiration date.
⚠️ Note: Tokens cannot exceed 365 days.Click Create.
Copy your API token and store it securely (e.g., in a password manager). You won’t be able to view it again.
5. Select Cost Unit
Choose the unit used for your costs in the integration setup:
Issues, Estimated development time (cycle time based), Points, Minutes.
6. Configure Additional Options
Depending on your Jira setup, you may want to enable:
Use Labels as Work Types
If your Jira issue types don’t reflect work types, you can use labels instead.
Map Subtasks to Parent Issues
If commits reference subtasks but you want analysis at the parent issue level, enable this. This ensures PM data and change coupling analysis happen on the parent issue.
Map Commits to Pull Request Issues
Use issues referenced in Pull Requests containing analyzed commits.
7. Verify Credentials and Fetch Data
Click Update and Continue.
If a second page appears, your credentials are correct, and CodeScene successfully fetched data.
8. Configure External Projects
Under the External Projects field, a list of available Jira projects will be displayed. Select the relevant projects you want to integrate with CodeScene.
Confirm that the following fields are correctly fetched from Jira:
Work In Progress Transition Names – The transition that indicates work is in progress.
Work Done Transition Names – The transition that indicates work is completed.
Defect Work Types – The work types used to identify defects.
If any of these fields are incorrect or incomplete, update them to match your Jira configuration.
Additional Optional Settings
Rename Work Types – Map work types to different names.
Cost Field – Specify which field represents cost.
Project Aliases – Map project aliases used on commits to PM project keys if they differ.
9. Submit and Re-run Analysis
Click Submit to save your configuration.
Re-run the analysis.
⚠️ Note: It may take a few days for enough data to accumulate before CodeScene stops reporting errors and showing the actual data. On the Analysis Results Dashboard, you can switch the timeframe to W (week) to see updated results sooner than at the monthly level.
This setup will enable CodeScene to correlate code hotspots with project costs and work type trends, giving you actionable insights into your delivery performance.