テキストモードで作業する
テキスト モードはワークフローを操作する高度な方法です。また、ステップおよびステータス間の相違を確認できます。
This page describes advanced configurations for transitions in Jira workflows. For information about the basics of workflows – see Working with workflow.
高度なワークフローについての他のトピックをこちらでご確認ください。
Jira 管理者は、ワークフロー トランジションの次の側面を制御できます。
トリガー – Bitbucket など、接続済みの開発ツールで特定のイベントが生じたときに Jira 課題をトランジションします。
条件 – トランジションがユーザーによって実行されるべきかどうかを検査します。
Validators – check that any input to the transition (for example, by a user) is valid, before the transition is performed.
Post functions – carry out additional processing, after a transition is performed.
プロパティ – キー値のペアで、トランジションをさらにカスタマイズするために使用できます。
トランジションの表示方法
グローバルトランジション
Jira 管理者は、リンク済みの開発ツール内のイベントに応答するトリガーを Jira ワークフローに設定できます。これにより、開発ツールと Jira ワークフローを設定できるため、たとえば、開発者がブランチを作成して Bitbucket の課題で作業を開始すると、課題は自動的にオープンから進行中にトランジションします。
To see, or to set, triggers for a transition, edit the workflow that contains the transition, select the transition, then click Triggers in the properties panel for the transition.
トリガーをトランジションに追加する方法
Select > Issues.
Click Workflows and then Edit for the relevant workflow.
In diagram mode, select the transition arrow. In text mode, select the transition's name from the Transitions (id) column.
In diagram mode, click Triggers in the properties panel to show the triggers configured for the transition. In text mode, select the Triggers tab.
Click Add trigger on the Triggers tab to configure a trigger.
For more information, check out Configuring workflow triggers.
条件は、トランジションがユーザーによって実行されるべきかどうかを制御します。たとえば、次のように条件を使用できます。
報告者にのみトランジションの実行を許可する
特定の権限を持つユーザにのみトランジションの実行が許可されている
コードがこの課題に対してコミットされた場合、またはコミットされなかった場合にのみ実行を許可する
条件が満たされない場合、「課題の表示」ページのトランジション ボタンが表示されず、トランジションを実行できません。
条件はトランジション画面でユーザーから収集した入力パラメーターを検証できません。これを実行するには、バリデーターを使用する必要があります。
Jira には、トランジションに追加可能な任意の条件がいくつかあります。
条件 | 説明 |
---|---|
常に False 条件 | この条件は常に失敗します。 |
承認されるまでトランジションをブロック | 保留中の承認がある場合に、課題のトランジションをブロックする条件です。 |
数値カスタム フィールドの比較 | 指定した数値カスタム フィールドと指定した値の比較結果が True の場合にトランジションを許可する条件です。 |
ユーザーに非表示条件 | この条件は、トランジションをユーザーから隠します。トランジションはワークフロー関数または REST からのみトリガー可能です。 |
担当者のみ条件 | この条件は、担当者にのみトランジションの実行を許可します。 |
報告者のみ条件 | この条件は、報告者にのみトランジションの実行を許可します。 |
権限条件 | この条件は、特定の権限を持つユーザにのみトランジションの実行を許可します。 |
前のステータス条件 | この条件は、課題が指定されたステータスでトランジションされたかどうかを確認します。 |
割り当てからの分離条件 | この条件は、ユーザーが課題のトランジションをすでに完了している場合、その課題をトランジションできないようにします。 |
サブタスクに応じたブロック条件 | この条件は、サブタスクのステータスに応じて親課題のトランジションをブロックします。 |
任意のグループのユーザー | この条件は、特定のグループのユーザーにのみトランジションの実行を許可します。 |
任意のプロジェクト ロールのユーザー | この条件は、特定のプロジェクト ロールのユーザーにのみトランジションの実行を許可します。 |
カスタム フィールド内のユーザー | 特定のカスタム フィールド内のユーザーにのみトランジションの実行を許可します。 |
グループ内のユーザー | この条件は、特定のグループのユーザーにのみトランジションの実行を許可します。 |
グループ カスタム フィールドのユーザー | この条件は、カスタム フィールドで指定されたグループのユーザーにのみトランジションの実行を許可します。 |
プロジェクト ロール内のユーザー | この条件は、特定のプロジェクト ロールのユーザーにのみトランジションの実行を許可します。 |
値フィールド | フィールドの値が定数値と等しいか、フィールドに値が設定されている場合にトランジションの実行を許可します。 |
To add a condition to a transition, edit the workflow that contains the transition, select the transition, then click Conditions in the properties panel for the transition.
条件をトランジションに追加する方法
Select > Issues.
Select Workflows.
Select More () and then Edit next to the relevant workflow.
In diagram mode, select the transition arrow. In text mode, select the transition's name from the Transitions (id) column.
In diagram mode, click Conditions in the properties panel to show the triggers configured for the transition. In text mode, select the Conditions tab.
When you click Add condition, you can choose from the available conditions, and set any necessary parameters for the condition. Additional conditions may be available from installed plugins, or you can create your own conditions using the plugin system; see the Workflow Plugin Modules for details.
条件をグループ化し、入れ子にすることで、複雑な条件を作成できます。どのような条件でも、その条件の「グループ化された条件を追加」アイコンをクリックすることによってグループ化できます。これで、上記で説明した新しいグループにさらに条件を追加できます。
You can toggle the logic for how the conditions in a group are applied between All and Any.
Validators check that any input made to the transition is valid before the transition is performed. Input can include that gathered from the user on the transition's screen.
検証が失敗した場合、課題はトランジションの目的のステータスに進まず、トランジションの 事後操作は実行されません。
To add a validator to a transition, edit the workflow that contains the transition, select the transition, then click Validators in the properties panel for the transition.
トランジションにバリデーターを追加する方法
Select > Issues.
Click Workflows and then Edit for the relevant workflow.
In diagram mode, select the transition arrow. In text mode, select the transition's name from the Transitions (id) column.
In diagram mode, click Validators in the properties panel to show the triggers configured for the transition. In text mode, select the Validators tab.
When you click Add validator, you can choose from the available validators and set any necessary parameters for the validator.
事後操作では、トランジション実行後に必要となる、以下のような追加の処理を実行します。
課題フィールドの更新
課題の変更履歴生成
課題へのコメント追加
メール通知をトリガーするイベントの生成
すべての Jira のトランジションで、次のような基本的な事後操作があり、この順番で実行されます。
課題のステータスをターゲット ワークフロー ステータスのリンクされたステータスに設定します。
トランジション中にコメントが入力された場合、そのコメントを課題に追加します。
課題の変更履歴を更新し、データベースに課題を格納します。
課題のインデックス再作成を行い、インデックスとデータベースを同期させます。
Fire a Generic event that can be processed by the listeners.
Do not edit or remove this post function. Changing this essential post function will cause unintended behavior for automations and Marketplace add-ons. If you wish to customize the post function events that fire on a transition, consider adding a custom post function and leave the default event alone.
これらの基本的な事後操作をトランジションから削除したり、並べ替えたりすることはできません。ただし、他の事後操作を間に挿入することはできます。
イベントを発生させる事後操作が、期待と異なる動作をする場合があります。Jira では、事後操作のシーケンスが終了するまで、通知リスナーの呼び出しを行いません。そのため、イベントは期待した順序で発生しますが、通知はトランジションの終了までトリガーされません。
Jira には、トランジションに追加可能な事後操作がいくつか含まれています。
オプションの事後操作 | 説明 |
---|---|
現在のユーザーへの割り当て | トランジションを実行しているユーザーに課題を割り当てます。 This post function is ignored unless the user has the Assignable User permission. Create a condition to give the logged-in user this permission before executing the transition. |
開発リーダーへの割り当て | プロジェクト リーダー、またはコンポーネント リーダーが存在する場合は、コンポーネント リーダーに課題を割り当てます。 |
報告者への割り当て | 課題を作成したユーザーに課題を割り当てます。 |
フィールド値のクリア | 特定のフィールドの値をクリアします。 |
他のフィールドの値をコピー | フィールド内の値を同じ課題内の別のフィールドまたは親課題からサブタスクにコピーします。 |
Perforce のジョブ機能を作成 | ワークフローのトランジション完了後、(必要に応じて)Perforce のジョブを作成します。 |
ユーザーのプロジェクト ロールに基づいた課題セキュリティ レベルの設定 | 現在のユーザーが指定されたプロジェクト ロールに存在する場合、課題のセキュリティ レベルを特定のレベルに設定します。 |
Webhook をトリガーする | ワークフローのトランジション完了後、指定された Webhook をトリガーします。Webhook は、安全性やコンプライアンスが不十分な環境にデータを送信する場合があることに注意してください。 When you add this post function, you will be asked to specify a webhook. This webhook must already be defined in Jira (see Managing webhooks). |
課題のカスタム フィールドの更新 | 課題のカスタム フィールドを所定の値に更新します。 |
課題フィールドの更新 | 課題のフィールドの一つを指定された値に更新します。更新可能なフィールドは、以下のとおりです。
This post function cannot update custom fields and must be positioned after the other optional post functions. |
Additional post functions may be available from installed plugins, or you can create your own post functions using the plugin system – see the Workflow Plugin Modules for details.
To add a post function to a transition, edit the workflow that contains the transition, select the transition, then click Post functions in the properties panel for the transition.
トランジションに事後操作を追加する方法
Select > Issues.
Click Workflows and then Edit for the relevant workflow.
トランジションを選択します。
ダイアグラム モードでは、トランジションの矢印を選択します。
In text mode, select the transition's name from the Transitions (id) column.
事後操作タブを開きます。
In diagram mode, click Post functions in the properties panel to show the triggers configured for the transition.
In text mode, select the Post functions tab.
Click Add post function.
Add the post function and choose Publish Draft to finalize your changes.
When you click Add post function you can choose from the available post functions, and set any necessary parameters. Options for editing or deleting a post function, and for changing the execution order, are at the right of the tab (hover there to see them).
課題が作成されたとき、特定のフィールドの値を設定するなどの処理タスクを実行する必要がある場合、ワークフローの最初のトランジションに事後操作を追加できます。最初のトランジションは、「作成」(空白のワークフローを作成した場合)または「課題の作成」(システム ワークフローを複製した場合)と呼ばれます。
Jira には、ワークフローの最初のトランジションを指定し、この順番で処理される以下の基本的な事後操作が含まれます。
課題を作成します。
リスナーが処理できるイベントを発生させます。
以下のオプション事後操作は、最初のトランジション用に特別に用意されています。
オプション事後操作(最初のトランジションのみ) | 説明 |
---|---|
コメント作成 | トランジション中にコメントが入力された場合、そのコメントを課題に追加します。 |
課題ステータスの更新 | 課題のステータスをターゲット ワークフロー ステータスのリンクされたステータスに設定します。 |
課題の保存 | 課題の更新を保存します(変更履歴は作成されません)。 |
Additionally, the standard optional post functions can also be added to an initial transition. Optional post functions added to the Create transition must be placed before the 'Create the issue originally' post function.
If you wish, you can configure the initial status for your workflow to go to a different initial transition. See Configuring the initial status for details.
If you need to set the 'Resolution' field when creating an issue, add the 'Update Issue Field' post function after the 'Create the issue' post function and after that, use the 'Store Issue' post function. The 'Store Issue' post function is useful for setting the Resolution field during issue creation.
ただし、課題の保存事後操作には以下のような制限があるため、必要な場合にのみ使用します。
変更履歴を生成しない
課題と 1 対多の関係を持つフィールド(たとえば、「バージョン」や「コンポーネント」)を保持できない
特定のトランジションが実行されたあと、課題フィールドの値を設定するには、「課題フィールドの更新」事後操作を使用します。
For example, you might want a transition that moves the issue to a closed status to automatically set the 'Resolution' field.
例:事後操作による解決状況フィールド設定
トランジションを持つワークフローを編集して、ステータスを他のステータスにドラッグし、新しいトランジションを作成します。
Select either None or a screen that does not contain the Resolution field.
新しい [課題フィールドの更新]事後操作を追加し、課題フィールドおよびフィールド値のリストから解決状況を選択します
To create a transition that clears the Resolution field, follow the same steps above for adding an 'Update Issue Field' post function to your transition. However, select None from the Field Value list.
このトランジションの事後操作一覧には、次のステートメントが含まれます。
The Resolution of the issue will be cleared.
Each time one of these transitions is executed, the Resolution of the issue is automatically set or cleared, as specified in these post functions.
Use the 'Fire an event that can be processed by the listeners' post function to fire the 'Generic Event', which is a built-in Jira event that can be used to trigger the sending of email notifications after a particular transition is executed.
Alternatively, you could fire a custom event that you've created specifically for this transition.
トランジションが実行されると、Jira は以下の動作を行います。
Look up the notification scheme associated with the issue's project and identify the users associated with the fired event;
各ユーザーにメール通知を送信します。
トランジションを作成または編集します。
Click the transition's Post Functions tab and edit the 'Fire an event that can be processed by the listeners' post function.
Select Generic Event from the list of events.
高度な課題ワークフローとともに Team フィールドを使用する場合は、チーム名ではなく Team UUID 値を使用する必要があります。
Select Update Issue Custom Field from the Add Post Function screen.
追加 を選択します 。
From the Issue Custom Field dropdown, select Team.
For Custom Field Value, you must enter the Team UUID.
チーム プロファイル ページに移動します。
URL から Team UUID の値をコピーします。例: https://yoursite.atlassian.net/people/team/[TeamUUID]
Paste the Team UUID to Custom Field Value.
プロパティはキー値のペアで、トランジションをさらにカスタマイズするために使用します。たとえば、トランジション プロパティはコピーしたシステム ワークフローを拡張して、言語の翻訳を可能にします。
トランジションのプロパティを表示、編集するには、
ダイヤグラムからトランジションを選択します。
Click Properties.
次のいずれかを実行します。
トランジションに新しいプロパティを追加する。
プロパティの右側にあるアイコンをクリックして、プロパティを削除する。
重要
It is not possible to edit a transition's properties on this page. To change any property's key or value (or both), you must first delete the property you wish to change and add the new updated property.
Note that you can also edit the transition in 'text' mode.
It is possible to implement restrictions on transitions using transition properties. For more information, see Workflow properties.
Global transitions allow any status in a workflow to transition to a particular status.
グローバル トランジションを追加するには、
When creating a new status (adding an existing status) – check the Add global transition to status option.
By selecting a status and checking Allow all statuses to transition to this one in the properties panel for the status.
同じターゲット ステップをポイントする 2 つのグローバル トランジションを作成するには、
From the workflow designer, create the first global transition as normal by selecting a step and checking Allow all statuses to transition to this one.
現在そのステップをポイントするグローバル トランジションを持たない 他の ステップで、2 番目のグローバル トランジションを作成します。
次に、作成した 2 番目のグローバル トランジションをテキスト エディターから選択します。
Click Edit and change the destination step to the same step you selected for your first global transition.
When you're done, click Update.
Jira を使いこなす
Discover even more ways to configure workflows with top workflow apps on the Atlassian Marketplace.
テキストモードで作業する
テキスト モードはワークフローを操作する高度な方法です。また、ステップおよびステータス間の相違を確認できます。
カスタム イベントの追加
Jira は、イベント リスナー メカニズムを使用して、何かが発生したことをシステムに警告し、発生したイベントに基づいて適切なアクションを実行します。
初期ステータスの設定
実行可能なアクティブなワークフローから始め、その後、ドラフト モード、またはシステム内の他のワークフローに切り替えられます。
ワークフロー トリガーについて
ワークフローでトリガーを効果的に使用する方法をご確認ください。
ワークフロー トリガーの設定
トリガーとは、Jira Cloud の課題と開発ツールの情報との同期を維持するための強力なツールです。
企業管理対象プロジェクトでワークフロー トリガーを使用する
これらのトリガーでは、コード リポジトリとの連携、または Atlassian が開発した他の製品との連携が必要です。
ワークフロー トリガーのトラブルシューティング
Jira Cloud で、ワークフロー トリガーのセットアップにお困りですか? 解決方法をご確認ください。
Jira Suite Utilities の必須フィールド検証を使用する
Jira Cloud で必須フィールド バリデーターを利用する方法をご確認ください。
企業管理対象プロジェクトでワークフロー バリデーターを使用する
Jira Cloud で企業管理対象プロジェクトに利用する既定のワークフロー バリデーターの詳細をご参照ください。
ワークフロー プロパティを使用する
利用可能な Jira Cloud ワークフロー プロパティを確認し、ワークフローに制限を適用します。
ワークフロー プロパティを追加する
ワークフローのステータスとトランジションに権限と制限を追加します。
Map a screen to a workflow transition
Discover how to map custom screens to transitions, ensuring the right information is captured at crucial stages of your project.
Restrict workflows based on user groups
Learn how to restrict workflows based on user groups, so that only designated team members can move items through specific statuses.
この内容はお役に立ちましたか?