Jira issues in VS Code
Create Jira issues in VS Code
Here are several ways to create Jira issues from the Atlassian for VS Code extension.
Using in-code links
The extension provides in-code links to create issues which are triggered from configurable keywords. By default, the extension ships with the following keywords configured: TODO
, BUG
, FIXME
, and ISSUE
.
Create an issue from context in VS Code
Another way to create an issue is by using the right-click context menu from anywhere in your code. Not only will this bring up the create issue screen, but it will also drop a link to the source code in Bitbucket with the exact line that was clicked into your issue’s description field. If you highlight multiple lines, the link will contain the range of lines selected.
Create an issue manually from VS Code
You can also create an issue without associating it with a line of code.
Create Issue screen in VS Code
Atlassian for VS Code supports many common Jira fields. Unfortunately, it’s not always possible to render complex custom fields contributed by various Jira plugins within the confines of VS Code.
In cases where an issue type contains a field that cannot be rendered, one of two things will happen:
If the field is not required, the field will simply not be shown.
If the field is required, the issue type is removed as an option entirely.
After the issue is created, the summary and description fields will be reset to blank with all other fields remaining with the previously selected options. This allows you to create multiple issues in rapid succession just like the “create another” option within Jira itself.
This is useful if you're doing a planning session and need to create a lot of issues with similar field values.
View and modify Jira issues
Learn the multiple ways within VS Code to open and update the details of a Jira issue.
Start work with Jira issues
The Start work on issue feature performs all the steps required in Jira and Bitbucket so you can start coding.
Before you begin using this feature:
Assign the issue to yourself
Create a new branch for the issue, containing the issue key and branch name
Checkout the new branch locally and link it to the remote repository branch
Transition the issue to 'In progress'
To use the feature:
- Double-click an open issue you would like to start working on from the Open Issues list on the Atlassian status bar.
- Click the Start work on an issue button to access the issue.
Once you select the Start work on an issue button, the following occurs:
- the issue is assigned to you
- the issue is transitioned to whatever state you selected
- a branch is created with the issue key in it's name
- a branch is checked out locally
- a branch has its upstream set to the remote branch
When you put an issue key in your branch name you can see and interact with issues similar to the way you would in Jira Software within the Bitbucket Cloud interface. Learn more
Including issue keys in every commit message is also a good idea. Not only do these get automatically linked in the Bitbucket interface, but it also helps the VS Code extension find issues related to commits and pull requests.
Never forget an issue key again
We’ve made it super simple to include your Jira issue keys in your commit messages without ever having to type one in or even remember what the key is. When you create a branch with the issue key in its name, you can use a git prepare-commit script to automatically add the issue key from the branch name into every commit comment.
Don’t know how to write a prepare-commit script? No worries, we’ve got you covered: