VS Code での Jira 作業項目
Atlassian for VS Code は Atlassian Labs プロジェクトとして公開されています。Atlassian Labs アプリにはユニークで便利な機能がありますが、Atlassian はお客様によるこれらのアプリの使用について責任を負いません。
Create Jira work items in VS Code
Here are several ways to create Jira work items from the Atlassian for VS Code extension.
コード内リンクの使用
The extension provides in-code links to create work items which are triggered from configurable keywords. By default, the extension ships with the following keywords configured: TODO
, BUG
, FIXME
, and WORK ITEMS
.
手順を確認
Select the line where you want to add your in-code link.
Add your in-code link and provide some context. For example,
// TODO: this needs to be fixed.
The message you provide after the in-line code becomes the Jira work item's subject line.The extension will prompt you to create a Jira work item. Select Create Jira work item which appears above the line you just added in Step 2.
Fill in or update any fields on the Create Work item form.
[送信] を選択します。
Once the work item is created, the comment will be replaced to show information about the work item.
これらのトリガーは [Atlassian Settings] 画面で構成できます。
Create a work item from context in VS Code
Another way to create a Jira work item is by using the right-click context menu from anywhere in your code. Not only will this bring up the create work item screen, but it will also drop a link to the source code in Bitbucket with the exact line that was clicked into your work item’s description field. If you highlight multiple lines, the link will contain the range of lines selected.
手順を確認
行で右クリックするか、複数の行をハイライト表示して選択した行範囲で右クリックすると、右クリック コンテキスト メニューが開きます。
Select Create New Jira work item from the list of menu items. The line or lines that you selected will be displayed in the Description field of the new Jira work item.
Fill in or update any fields on the Create Work item form.
[送信] を選択します。
Bitbucket ではなく別のソース管理システム (Github など) を使用している場合、その行番号の範囲の相対パスが説明フィールドに追加されます。
Create a work item manually from VS Code
You can also create a work item without associating it with a line of code.
手順を確認
コマンド パレットから
Open the command palette by executing the following Atlassian: Open Settings command: Command + Shift + P (on Mac) or Ctrl + Shift + P (on PC) and search for Create New Jira Work item.
From the command palette: choose the Create New Jira Work item command.
Fill in or update any fields on the Create Work item form.
[送信] を選択します。
From the Jira work item tree
Select the Atlassian logo on the leftmost navigation bar.
Select the JIRA Work item heading on the Atlassian status bar.
Select the + to open the a new Create Work item form.
Fill in or update any fields on the Create Work item form.
[送信] を選択します。
Create Work item screen in VS Code
Atlassian for VS Code は、多くの一般的な Jira フィールドをサポートします。しかしながら、さまざまな Jira プラグインによって提供された複雑なカスタム フィールドのなかには、VS Code ではレンダリングできないものもあります。
In cases where a work item type contains a field that cannot be rendered, one of two things will happen:
フィールドが必須ではない場合、フィールドは表示されません。
If the field is required, the work item type is removed as an option entirely.
Created with Sketch.
After the work item 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 work items 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 work items with similar field values.
View and modify Jira work items
Learn the multiple ways within VS Code to open and update the details of a Jira work item.
手順を確認
Select a work item in a work item tree
If you’re looking through the list of work items in a work item tree, simply selecting a work item will bring up the work item’s details screen.
Command Palette を使用する
If you know the work item key you want to open, you can quickly open the details screen from the command palette:
コマンド パレットを開くには、次の [Atlassian: Open Settings] コマンドを実行します: Command + Shift + P (Mac の場合) または Ctrl + Shift + P (PC の場合) を実行。
Search for 'open Jira work item' and select Atlassian: Open Jira Work item
An input box is displayed where you can type in your work item key and hit enter to open the details.
Work Item Hovers
The extension includes support for Work Item Hovers.
Hover over a work item key anywhere in your code (usually in code comments) and you’ll get a quick view modal for the work item.
Within the modal, click the Open Work Item View link to open the full work item details screen.
Work item hovers can be disabled/enabled in the Atlassian Settings screen.
Start work with Jira work items
The Start work on work item feature performs all the steps required in Jira and Bitbucket so you can start coding.
この機能の使用を始める前に、次の点を確認します。
Assign the work item to yourself
Create a new branch for the work item, containing the work item key and branch name
新しいブランチをローカルにチェックアウトし、それをリモート リポジトリ ブランチにリンクする
Transition the work item to 'In progress'
この機能を使用するには、次の手順を実行します。
Double-click an open work item you would like to start working on from the Open Work Items list on the Atlassian status bar.
Click the Start work on a work item button to access the work item.
Once you select the Start work on a work item button, the following occurs:
the work item is assigned to you
the work item is transitioned to whatever state you selected
a branch is created with the work item key in it's name
ブランチがローカルにチェックアウトされます。
ブランチのアップストリームがリモート ブランチに設定されます。
When you put a work item key in your branch name you can see and interact with work items similar to the way you would in Jira within the Bitbucket Cloud interface. Learn more
Including work item 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 work items related to commits and pull requests.
Never forget a work item key again
We’ve made it super simple to include your Jira work item 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 work item key in its name, you can use a git prepare-commit script to automatically add the work item key from the branch name into every commit comment.
prepare-commit スクリプトの作成方法が不明な場合、以下をご覧ください。
bitbucket.org/snippets/atlassian/qedp7d/...
この内容はお役に立ちましたか?