サービス

他のツールとの連携

このページの内容

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

サービスは、JIRA 内で定期的に実行されるクラスです。サービスは JIRA 内で実行されるため、すべての JIRA API を使用できます - また、Java で記述されているため、任意の Java ライブラリを使用できます。

サービスが便利なのは、データを JIRA に定期的にプルすることにより、外部システムとの統合が可能になるためです。JIRA には、事前に作成されたサービスがいくつか付属していて、カスタム サービスを作成して、実行時にプラグインすることもできます。

(tick) 新しいサービスを作成しませんか?

組み込みの JIRA サービスを拡張していない場合は、SAL API を使用した新しいサービスの作成をぜひとも検討すべきです。詳細については、 SAL チュートリアルを使用したイベント スケジュールの作成 を参照してください。

For all of the following procedures, you must be logged in as a user with the JIRA System Administrators global permission.

サービスの登録

(info) For custom-written services, make sure your service class is in the classpath where JIRA can see it — the best locations are usually the <jira-application-dir>/WEB-INF/classes or <jira-application-dir>/WEB-INF/lib subdirectories within of your JIRA application installation directory (as JAR files).

  1. > [システム] の順に選択します。 
  2. 詳細 > サービス を選択し、すべての設定済みサービスを表示するページを開きます。
  3. ページの下部にある サービスの追加 フォームで、次のフィールドの入力を完了します。
    • 名前 - このサービスの記述名。
    • Class — the fully-qualified class name of your service. This is likely to have the form com.atlassian.jira.service.services.type.TypeService
      See Sample services for provided service class names.
      (info) To use one of JIRA's built-in service classes, first click the Built-in Services link to expand the list of service classes and then click the name of the specific class in the list. The fully-qualified class name of the built-in service will be added to the Class field.
    • 遅延 - サービス実行間の遅延(分単位)。
      たとえば、デバッグ サービスを追加するには、組み込みサービスをクリックし、次にデバッグ サービスリンクをクリックします。
  4. サービスの追加 フォームのフィールドに入力し終えたら、サービスの追加 ボタンをクリックします。これにより 編集サービスページが開き、新しいサービスのオプションを設定できます。
    (info) サービスのオプションは、選択したサービスのタイプ(すなわちクラス)によって異なります。
  5. 編集サービス ページの残りのオプション設定を完了したあと、更新 ボタンをクリックして、新しいサービスのオプションを保存します。

サービス プロパティの編集

  1. > [システム] の順に選択します。 
  2. 詳細 > サービス を選択し、すべての設定済みサービスを表示するページを開きます。
  3. プロパティを編集したいサービスに関連付けられた 編集 リンクをクリックします。

たとえば、JIRA からメールが送信される間隔を変更するには、メールキューサービス を編集し、遅延 を既定値の 1 分から変更します。

サービスの削除

  1. > [システム] の順に選択します。 
  2. 詳細 > サービス を選択し、すべての設定済みサービスを表示するページを開きます。
  3. 削除したいサービスに関連付けられた 削除 リンクをクリックします。

組み込みサービス

JIRA にはすぐに利用できる便利なサービスがあり、そのまま使用することもできれば、独自の環境で使用するために修正することもできます。組み込みサービスのすべてのソースコードが利用可能で、独自のサービスを作成する簡単さがよくわかります。すべての組み込みサービスは JIRA に含まれており、使用に必要なのは設定だけです。

エクスポート サービス

エクスポート サービスは、定期的に JIRA をバックアップするのに便利です。このサービスが実行されるたびに、パラメーターとして用意されたディレクトリに、JIRA のデータがすべてエクスポートされます。エクスポート ファイルにはタイムスタンプが付けられるため、このサービスはバックアップシステムとして機能します。

To test this service, add a service with the class com.atlassian.jira.service.services.export.ExportService. JIRA sets up an ExportService in new JIRA installations (once the setup wizard has been completed). Hence, you may find you already have one.

You can find this class within the following directory of an expanded JIRA source archive (which can be downloaded by JIRA customers from https://my.atlassian.com):
<source-installation-directory>/jira-project/jira-components/jira-core/src/main/java/com/atlassian/jira/service/services/export

メールハンドラ サービス

JIRA のメールハンドラ サービスは、JIRA の サービス ページで設定することはできません (削除する場合を除く)。カスタム メールハンドラの作成を含め、JIRA のメールハンドラ設定の詳細については、 メールから課題やコメントを作成する を参照してください。

カスタム サービス

If you are a JIRA developer who wishes to write your own JIRA service, please note that JIRA Service classes must all extend com.atlassian.jira.service.JiraService. Most do so by extending com.atlassian.jira.service.AbstractService or some more specialized subclass.

最終更新日: 2019 年 10 月 3 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.