Changes between Version 1 and Version 2 of TracTicketsCustomFields


Ignore:
Timestamp:
Jun 21, 2008, 6:11:58 PM (16 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracTicketsCustomFields

    v1 v2  
    1 = カスタムチケット属性 =
    2 Trac ではチケットにユーザ定義の属性を追加できます。カスタムチケット属性を使用すると、定型で、プロジェクト特有のプロパティをチケットに持たせることができます。
     1= Custom Ticket Fields =
     2Trac supports adding custom, user-defined fields to the ticket module. Using custom fields, you can add typed, site-specific properties to tickets.
    33
    4 == 設定方法 ==
    5 カスタムチケット属性を設定するためには、 [wiki:TracIni trac.ini] ファイルを変更します。カスタムフィールドは、 trac.ini ファイルの `[ticket-custom]` セクションに書く必要があります。
     4== Configuration ==
     5Configuring custom ticket fields is done in the [wiki:TracIni trac.ini] file. All field definitions should be under a section named `[ticket-custom]`.
    66
    7 各属性の定義は以下のように記述します:
     7The syntax of each field definition is:
    88{{{
    9  属性名 = タイプ
    10  (属性名.オプション = 値)
     9 FIELD_NAME = TYPE
     10 (FIELD_NAME.OPTION = VALUE)
    1111 ...
    1212}}}
    13 構文の詳細は以下の例を見てください。
     13The example below should help to explain the syntax.
    1414
    15 === 属性のタイプとオプション ===
    16  * '''text''': シンプルな(1行の)テキスト。
    17    * label: 説明となるラベル
    18    * value: デフォルト値
    19    * order: ソート時の並び順 (フォーム内での相対的位置を決定します。)
    20  * '''checkbox''': ブーリアン値をもつチェックボックス。
    21    * label: 説明となるラベル。
    22    * value: デフォルト値 (0 または 1).
    23    * order: ソート時の並び順
    24  * '''select''': ドロップダウンするリストボックス。
    25    * label: 説明となるラベル。
    26    * options: リストに表示する値を '''|''' (vertical pipe) 区切りで記述。
    27    * value: デフォルト値 (0から始まるリスト内での番号) 。
    28    * order: ソート時の並び順
    29  * '''radio''': ラジオボタン。 HTML の '''select''' 要素と同じ。
    30    * label: 説明となるラベル。
    31    * options: リストに表示する値を '''|''' (vertical pipe) 区切りで記述。
    32    * value: デフォルト値 (0から始まるリスト内での番号) 。
    33    * order: ソート時の並び順
    34  * '''textarea''': 複数行のテキストエリア。
    35    * label: 説明となるラベル。
    36    * value: デフォルトで設定されるテキスト。
    37    * cols: 入力領域のカラム幅。
    38    * rows: 入力領域の行数。
    39    * order: ソート時の並び順
     15=== Available Field Types and Options ===
     16 * '''text''': A simple (one line) text field.
     17   * label: Descriptive label.
     18   * value: Default value.
     19   * order: Sort order placement. (Determines relative placement in forms.)
     20 * '''checkbox''': A boolean value check box.
     21   * label: Descriptive label.
     22   * value: Default value (0 or 1).
     23   * order: Sort order placement.
     24 * '''select''': Drop-down select box. Uses a list of values.
     25   * label: Descriptive label.
     26   * options: List of values, separated by '''|''' (vertical pipe).
     27   * value: Default value (Item #, starting at 0).
     28   * order: Sort order placement.
     29 * '''radio''': Radio buttons. Essentially the same as '''select'''.
     30   * label: Descriptive label.
     31   * options: List of values, separated by '''|''' (vertical pipe).
     32   * value: Default value (Item #, starting at 0).
     33   * order: Sort order placement.
     34 * '''textarea''': Multi-line text area.
     35   * label: Descriptive label.
     36   * value: Default text.
     37   * cols: Width in columns.
     38   * rows: Height in lines.
     39   * order: Sort order placement.
    4040
    41 === サンプル ===
     41=== Sample Config ===
    4242{{{
    4343[ticket-custom]
     
    7171}}}
    7272
    73 ''Note: `select` タイプのフィールドを非必須 (optional) にしたい場合、 `フィールド名.options` オプションの先頭に `バーティカルパイプ (|)` を設定してください。''
     73''Note: To make entering an option for a `select` type field optional, specify a leading `|` in the `fieldname.options` option.''
    7474
    75 === カスタム属性を含むレポート ===
     75=== Reports Involving Custom Fields ===
    7676
    77 カスタム属性を含む TracReports では比較的 SQL を間違えやすいです。 `ticket_custom` 表の `JOIN` はカスタム属性ごとにそれぞれ必要です。
     77The SQL required for TracReports to include custom ticket fields is relatively hard to get right. You need a `JOIN` with the `ticket_custom` field for every custom field that should be involved.
    7878
    79 以下の例は `progress` という名前のカスタム属性を含むレポートです:
     79The following example includes a custom ticket field named `progress` in the report:
    8080{{{
    8181#!sql
     
    9494}}}
    9595
    96 この `LEFT OUTER JOIN` ステートメントに特に注意してください。
     96Note in particular the `LEFT OUTER JOIN` statement here.
    9797
    9898----