カスタム フィールドを最適化する

カスタム フィールドの数が多くなると、課題の表示、検索、作成が遅くなる可能性があります。サイト上のカスタム フィールドの数を減らすことで、Jira を高速化して、応答性を高めます。ここでは、カスタム フィールドの数を減らすさまざまな方法を示します。

未使用のカスタム フィールドを削除する

カスタム フィールドを削除するには、Jira 管理者である必要があります。

未使用のカスタム フィールドを削除するには、次の手順を実行します。

  1. [設定] () > [課題] に移動します。

  2. [フィールド] で [カスタム フィールド] を選択します。

  3. 不要なカスタム フィールドを見つけます。[画面とコンテキスト] 列と [プロジェクト] 列にはフィールドが使用されている場所が表示され、[Last used (最終利用)] 列にはフィールドが最後に更新された時間が表示されます。

  4. 未使用のカスタム フィールドごとに、[] > [ゴミ箱に移動] の順に選択します。

カスタム フィールドを復元するには、[ゴミ箱に移動済み] タブに移動します。

パフォーマンスとスケールのインサイトのベータ版リリースに参加している場合

  1. [グローバル設定]、[システム]、[Performance and Scale Insights (パフォーマンスとスケールのインサイト)] の順に移動します。

  2. [カスタム フィールド] を選択し、[分析を実行] を選択します。

  3. 未使用のカスタム フィールドが、そのページのテーブルに表示されます。

  4. 未使用のカスタム フィールドごとに、[ゴミ箱に移動] を選択します。

ドロップダウンのオプションを制限する

[選択リスト (単一選択)] タイプと [選択リスト (複数選択)] タイプのカスタム フィールドのオプションが多すぎると、課題の作成、編集、表示が遅くなる可能性があります。

ヒント: 同様のオプションを含むカスタム フィールドをまとめる

同様のオプション リストを含むカスタム フィールドがある場合は、それらを 1 つのフィールドにまとめると、不要なフィールドをさらに削除できます。

高度な設定: ドロップダウンをテキスト フィールドに置き換える

フィールドの用途に適している場合は、選択リスト フィールドをテキスト フィールドに変更して、指定可能な値を文書化できます。これを行うには、カスタム フィールドを作成して、以下の Python スクリプトを実行します。この Python スクリプトは、この Jira REST API 仕様を使用しています。

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 from jira_client import ApiClient # Configuration is ambiguous from jira_client.configuration import Configuration as ApiConfiguration from jira_client.rest import ApiException from jira_client import IssuesApi, IssueFieldsApi from pprint import pprint configuration = ApiConfiguration() configuration.username = 'brodie@example.com' configuration.password = '[my app token]' configuration.host = 'https://mycompany.atlassian.net' # Turn on debug output if needed #configuration.debug = True configuration.debug = False # Issue keys we want to update issue_key_arr = [ 'JPY3-1', 'JPY3-2' ] api_client = ApiClient(configuration) # Find the field keys for the fields we are interested in from_field_name = 'Product Selection' # Single select field from_field_type = 'com.atlassian.jira.plugin.system.customfieldtypes:select' from_field_key = None to_field_name = 'Product' # Text select field to_field_type = 'com.atlassian.jira.plugin.system.customfieldtypes:textfield' to_field_key = None issue_fields_api = IssueFieldsApi(api_client) # Find the "from" field fields = issue_fields_api.get_fields_paginated(start_at=0, max_results=5, query=from_field_name) if fields.total > 0: for this_field in fields.values: if (this_field.name == from_field_name) and (this_field.schema.custom == from_field_type): from_field_key = this_field.id print(f"Found the from field id={from_field_key}") break # Find the "to" field fields = issue_fields_api.get_fields_paginated(start_at=0, max_results=5, query=to_field_name) if fields.total > 0: for this_field in fields.values: if (this_field.name == to_field_name) and (this_field.schema.custom == to_field_type): to_field_key = this_field.id print(f"Found the to field id={to_field_key}") break if from_field_key == None: raise ValueError('The "from" field could not be found') if to_field_key == None: raise ValueError('The "to" field could not be found') for issue_key in issue_key_arr: print(f"Processing issue {issue_key}") try: issue = issues_api.get_issue(issue_key) except ApiException as api_exception: if api_exception.status == 404: print(f"Issue {issue_key} not found") else: # TODO: Handle 429 nicely raise api_exception else: print(f"For issue {issue_key}, id={issue.id}") issue_fields = issue.fields from_field_value = issue_fields[from_field_key]['value'] to_field_value = issue_fields[to_field_key] print(f"Before: From value=\"{from_field_value}\", To value=\"{to_field_value}\"") if from_field_value != None and to_field_value == None: print("Updating To value for issue {issue_key}") issue_fields = {} issue_fields[to_field_key] = from_field_value issue_body = { "fields": issue_fields } issues_api.edit_issue(issue_body, issue.id) print(f"Updated issue {issue_key} successfully") else: print(f"Value does not need to be updated for issue {issue_key}")

ヒント: テキスト フィールドとともにワークフロー バリデーターを使用する

テキスト フィールドが許容される値であることを確認するには、ワークフロー バリデーターを追加します。ワークフロー バリデーターの設定の詳細をご確認ください

その他のヘルプ