Generate code from a work item in Jira
When AI features are enabled in your Jira space, you can use Jira Coding Agent to generate code directly from the work item based on its details.
Before you begin
To use Jira Coding Agent, make sure:
AI features are enabled in your Jira space.
You have Rovo credits available. How to check Rovo credits
You’re on a Standard or Premium plan.
Bitbucket Cloud or GitHub Cloud is connected to your Jira site. Connect a repository
You have permission to use Development tools in Jira.
Generate code from a work item
Start using Jira Coding Agent directly from the Agents section on your work item, or add it as an assignee.
To generate code based on the work item:
Open the work item.
From the Agents section, select Start work, then select Jira Coding Agent.
Or, assign a work item to Jira Coding Agent. Jira Coding Agentwill appear in the Agents section.
Select the repository where you want to generate the code. You can select multiple repositories. Jira Coding Agent will create a separate session per repository.
Enter a prompt or add a saved prompt from the repository to provide more context (like specific instructions or references like code standards, important file paths and related examples).
Select Settings () to define code and environment settings for your sessions. Configure a Jira Coding Agent session
Select Generate code in draft pull request if you want Jira Coding Agent to create a pull request for the code changes it made.
This configures your code settings to let Jira Coding Agent push code changes to your branch. It will always create a draft pull request on your behalf, for you and your team to review and merge. Change this in Settings () at any time.
Select Generate code.
Jira Coding Agent starts working and generates code based on the work item and any extra context you added. Select the session to view the code (even while Jira Coding Agent is working).
Edit generated code
View and edit the code generated by Jira Coding Agent for your current session, or a previous session you were working on.
To edit code generated by Jira Coding Agent:
Go to your work item and open a session with Jira Coding Agent.
Use the chat panel to ask Jira Coding Agent questions about the code, or ask Jira Coding Agent to make changes.
Highlight specific lines of code to let Jira Coding Agent know exactly which code you’re referencing in your chat message.
Select files to see the code difference. You can also edit code directly if you like.
Repeat the steps until you’re happy with the code.
Once done, you can commit code changes to a branch and raise a pull request.
If you configured Jira Coding Agent to commit code to your branch and create a draft pull request on your behalf, it won’t merge the draft pull request directly, but will hand it back to your team for review and merge.
Create a pull request
Once you’re happy with your code, create a pull request. Or, if a pull request is already created, commit your changes to it.
To create a pull request:
In the chat panel, select Create pull request.
Enter a commit message.
Select Create pull request.
If you include your Jira work item key in the commit message or pull request description, the pull request will be automatically linked to the work item.
You (as the person using Jira Coding Agent) will be listed as the pull request author and author of any commits.
Manage Jira coding agent sessions
Jira Coding Agent sessions let you continue from where you left off by maintaining conversation history and context across multiple interactions.
Each session keeps its own message history and conversation context in the sandbox environment. Sessions are scoped to the Jira site you’re working in, and when you view all sessions, you’ll only see your own Jira coding agent sessions for that site.
To view your Jira Coding Agentsessions:
Select Agents from the side navigation to view all sessions across your site.
Select a session to continue working on it or archive the session when you’ve completed your work. You can unarchive sessions later if needed.
What can the Jira Coding Agent access?
Jira Coding Agent processes data in a secure, cloud-based coding session that runs inside a dedicated sandbox environment. Only the person who starts the Jira coding agent session (or runs the Generate code automation rule) can access that sandbox.
Jira Coding Agent can interact with Atlassian apps and your code to understand tasks and generate code changes.
It can:
Perform create, read, update, and search operations (but not delete) in Jira and Confluence on the initiating user’s behalf, where the user has the required permissions
Read from and write to connected code repositories, limited to the repository selected for the session
Run Bash or PowerShell commands inside the secure sandbox environment
Jira Coding Agent acts strictly on behalf of the initiating user. It can’t exceed that user’s existing permissions and restrictions when accessing Atlassian apps and connected repositories. It is an autonomous agent and may perform these actions without asking for confirmation each time.
For each session, Jira Coding Agent clones only the selected repository into a secure sandbox. It doesn’t copy data from other repositories or your local file system, and any data deletion is limited to the sandbox.
Jira Coding Agent lets users choose whether it pushes code changes to a branch and creates a draft pull request on their behalf. It doesn’t merge pull requests. Your team remains in control of reviewing, approving, and merging any code that Jira Coding Agent generates, and users should carefully review all changes before merging them into their codebase.
Jira Coding Agent doesn’t connect to third-party data sources using Model Context Protocol (MCP)
Administrators can turn Jira AI features on or off at the space level at any time.
Was this helpful?