Changes between Version 1 and Version 2 of TracReports


Ignore:
Timestamp:
Jun 21, 2005, 1:13:35 AM (19 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracReports

    v1 v2  
    1 = Trac Reports =
     1= レポート =
    22[[TracGuideToc]]
    33
    4 The Trac reports module provides a simple, yet powerful reporting facility
    5 to present information about tickets in the Trac database.
     4レポートモジュールは、簡単かつ強力なレポーティング機能を提供します。
     5この機能によって、 Trac データベースのチケット情報を取得することができます。
    66
    7 Rather than have its own report definition format, TracReports relies on standard SQL
    8 SELECT statements for custom report definition.
     7TracReports ではレポートの形式を定義するための方法として、独自フォーマットではなく、
     8SQL の SELECT 文を使用することにしました。
    99
    10 A report consists of these basic parts:
    11  * ID -- Unique (sequential) identifier
    12  * Title  -- Descriptive title
    13  * Description  -- A brief description of the report, in WikiFormatting text.
    14  * Report Body -- List of results from report query, formatted according to the methods described below.
    15  * Footer -- Links to alternative download formats for this report.
     10レポートは以下の基本的なパーツから構成されます:
     11 * ID -- ユニークな (連番の) 識別子
     12 * レポート名 (Title)  -- レポートのタイトル
     13 * 説明 (Description)  -- WikiFormatting で記述された、レポートの説明。
     14 * レポート本体 (Report Body) -- 後に述べるフォーマットで規定された、レポートクエリの結果。
     15 * フッタ(Footer) -- レポート本体を異なる形式でダウンロードするためのリンク。
    1616
    1717
    18 == Changing Sort Order ==
    19 Simple reports - ungrouped reports to be specific - can be changed to be sorted by any column simply by clicking the column header.
     18== ソートの並び順変更 ==
     19単純なレポート (特にグループ化されていないもの) では、カラムのヘッダをクリックすれば、そのカラムでソートすることが出来ます。
    2020
    21 If a column header is a hyperlink (red), click the column you would like to sort by. Clicking the same header again reverses the order.
     21カラムのヘッダがハイパーリンク (赤) になっていれば、クリックすることでそのカラムでのソートができます。並び順を逆にするには、もう一度クリックします。
    2222
    2323
    24 == Alternate Download Formats ==
    25 Aside from the default HTML view, reports can also be exported in a number of alternate formats.
    26 At the bottom of the report page, you will find a list of available data formats. Click the desired link to
    27 download the alternate report format.
     24== ダウンロードできるフォーマット ==
     25通常表示される HTML でのビューの加え、レポートはいろいろな形式で使用することができます。
     26レポートページの一番下に、利用可能なデータ形式の一覧があります。望む形式のリンクをクリックすれば、
     27その形式でのレポートをダウンロードすることができます。
    2828
    29 === Comma-delimited - CSV (Comma Separated Values) ===
    30 Export the report as plain text, each row on its own line, columns separated by a single comma (',').
    31 '''Note:''' Column data is stripped from carriage returns, line feeds and commas to preserve structure.
     29=== カンマ区切りテキスト - CSV (Comma Separated Values) ===
     301レコードを1行として、各カラムをカンマ (',') で区切ったプレーンテキストとしてダウンロードできます。
     31'''Note:''' CSV形式を保つため、各カラムのデータに改行文字やカンマがある場合、その位置で切り取られます。
    3232
    33 === Tab-delimited ===
    34 Like above, but uses tabs (\t) instead of comma.
     33=== タブ区切り ===
     34CSV と似ていますが、水平タブ文字 (\t) で区切られる点が違います。
    3535
    3636=== RSS - XML Content Syndication ===
    37 All reports support syndication using XML/RSS 2.0. To subscribe to a , click the the orange 'XML' icon at the bottom of the page. See TracRss for general information on RSS support in Trac.
     37全てのレポートは、 XML/RSS 2.0 での配信をサポートしています。購読するにはページ下部にある、オレンジ色の 'XML' アイコンをクリックしてください。 Trac での RSS サポートについての一般的な情報は、 TracRss に記述しています。
    3838
    3939----
    40 == Creating Custom Reports ==
     40== カスタムレポートを作成する ==
    4141
    42 ''Creating a custom report requires a comfortable knowledge of SQL.''
     42''カスタムレポートを作成するためには、 SQL を楽に書ける程度の知識が必要です。''
    4343
    44 A report is basically a single named SQL query, executed and presented by
    45 Trac.  Reports can be viewed and created from a custom SQL expression directly
    46 in from the web interface.
     44レポートは基本的に、 Trac が実行できる形式の、名前がついた特定 SQL です。
     45レポートに指定された SQL は、直接 Web インタフェースから閲覧したり、
     46作成したりできます。
    4747
    48 Typically, a report consists of a SELECT-expression from the 'ticket' table,
    49 using the available columns and sorting the way you want it.
     48通常のレポートは、 'ticket' 表に対する、カラムの選択や、ソート指定を伴った
     49SELECT 文となります。
    5050
    51 == Ticket columns ==
    52 The ''ticket'' table has the following columns:
    53  * id
    54  * time
    55  * changetime
    56  * component
    57  * severity 
    58  * priority
    59  * owner
    60  * reporter
    61  * cc
    62  * url
    63  * version
    64  * milestone
    65  * status
    66  * resolution
    67  * summary
    68  * description
     51== Ticket 表のカラム ==
     52''ticket'' 表は、以下のカラムを持ちます:
     53 * id           -- チケットID
     54 * time         -- 登録日時
     55 * changetime   -- 最終更新日時
     56 * component    -- コンポーネント
     57 * severity     -- 重要度
     58 * priority     -- 優先度
     59 * owner        -- 担当者
     60 * reporter     -- 報告者
     61 * cc           -- 関係者
     62 * url          -- URL
     63 * version      -- バージョン
     64 * milestone    -- マイルストーン
     65 * status       -- ステータス
     66 * resolution   -- 解決方法
     67 * summary      -- チケットの概要
     68 * description  -- チケットについての完全な説明
    6969
    70 See TracTickets for a detailed description of the column fields.
     70各カラムに対応する属性の詳細な説明は、 TracTickets に記述しています。
    7171
    72 '''all active tickets, sorted by priority and time'''
     72'''優先度順、登録日時順の全未解決チケット'''
    7373
    74 '''Example:''' ''All active tickets, sorted by priority and time''
     74'''例:''' ''優先度順、登録日時順の全未解決チケット''
    7575{{{
    7676SELECT id AS ticket, status, severity, priority, owner,
     
    8484
    8585
    86 == Advanced Reports: Dynamic Variables ==
    87 For more flexible reports, Trac supports the use of ''dynamic variables'' in report SQL statements.
    88 In short, dynamic variables are ''special'' strings that are replaced by custom data before query execution.
     86== 上級トピック: 動的変数の使用 ==
     87レポートに汎用性を持たせる手段として、 ''動的変数'' をレポート SQL で使用する方法があります。
     88簡単に言うと、動的変数とは、クエリを実行する前に置き換えられる ''特別な'' 文字列のことです。
    8989
    90 === Using Variables in a Query ===
    91 The syntax for dynamic variables is simple, any upper case word beginning with '$' is considered a variable.
     90=== クエリで動的変数を使う方法 ===
     91動的変数を使うためのシンタックスは単純です。 '$' に続いて、大文字で変数名となる語を挿入してください。
    9292
    93 Example:
     93:
    9494{{{
    9595SELECT id AS ticket,summary FROM ticket WHERE priority='$PRIORITY'
    9696}}}
    9797
    98 To assign a value to $PRIORITY when viewing the report, you must define it as an argument in the report URL, leaving out the the leading '$'.
     98レポート閲覧時、 $PRIORITY に値を当てはめるためには、レポートの URL に引数として変数を与えてください。この変数名に '$' を入れてはいけません。
    9999
    100 Example:
     100:
    101101{{{
    102102 http://projects.edgewall.com/trac/reports/14?PRIORITY=high
     
    104104
    105105
    106 === Special/Constant Variables ===
    107 There is one ''magic'' dynamic variable to allow practical reports, its value automatically set without having to change the URL.
     106=== 特殊な定数 ===
     107実用的なレポートのために、定義済みの動的変数が用意されています。これらは URL に値を設定しなくても、自動的に値が割り当てられます。
    108108
    109  * $USER -- Username of logged in user.
     109 * $USER -- ログインに使用したユーザ名。
    110110
    111 Example (''List all tickets assigned to me''):
     111例 (''私が担当になっているチケット一覧''):
    112112{{{
    113113SELECT id AS ticket,summary FROM ticket WHERE owner='$USER'
     
    118118
    119119
    120 == Advanced Reports: Custom Formatting ==
    121 Trac is also capable of more advanced reports, including custom layouts,
    122 result grouping and user-defined CSS styles. To create such reports, we'll use
    123 specialized SQL statements to control the output of the Trac report engine.
     120== 上級トピック: 表示形式のカスタマイズ ==
     121Trac には、レイアウトのカスタマイズや、グルーピング、ユーザ定義の CSS 利用などによる
     122もっと複雑なレポートの作成も可能です。このようなレポートを作成するには、
     123Trac のレポートエンジンが出力を制御するためのステートメントを含む、特別な SQL を使用します。
    124124
    125 == Special Columns ==
    126 To format reports, TracReports looks for 'magic' column names in the query
    127 result. These 'magic' names are processed and affect the layout and style of the
    128 final report.
     125== 特別なカラム ==
     126レポートを整形するため、 TracReports はクエリの結果から '特定の' カラム名を
     127探します。このような '特定の' 名前で、最終的なレポートのレイアウトやスタイルが
     128処理され、変更されます。
    129129
    130 === Automatically formatted columns ===
    131  * '''ticket''' -- Ticket ID number. Becomes a hyperlink to that ticket.
    132  * '''created, modified, date, time''' -- Format cell as a date and/or time.
     130=== 自動的に整形されるカラム名 ===
     131 * '''ticket''' -- チケットの ID が入っているカラムで使用します。該当する ID のカラムにハイパーリンクされます。
     132 * '''created, modified, date, time''' -- 日付や時刻に整形されます。
    133133
    134  * '''description''' -- Ticket description field, parsed through the wiki engine.
     134 * '''description''' -- チケットの説明が入っているカラムで使用します。 Wiki エンジンで処理されます。
    135135
    136 '''Example:'''
     136''':'''
    137137{{{
    138138SELECT id as ticket, created, status, summary FROM ticket
    139139}}}
    140140
    141 === Custom formatting columns ===
    142 Columns whose names begin and end with 2 underscores (Example: '''_''''''_color_''''''_''') are
    143 assumed to be ''formatting hints'', affecting the appearance of the row.
     141=== 整形されるカラムのカスタマイズ ===
     142カラム名の前後に 2 つのアンダースコアがついている場合 (例: '''_''''''_color_''''''_''') は、
     143''整形用のヒント'' として扱われ、レコードの整形が行われます。
    144144 
    145  * '''_''''''_group_''''''_''' -- Group results based on values in this column. Each group will have its own header and table.
    146  * '''_''''''_color_''''''_''' -- Should be a numeric value ranging from 1 to 5 to select a pre-defined row color. Typically used to color rows by issue priority.
    147  * '''_''''''_style_''''''_''' -- A custom CSS style expression to use for the current row.
     145 * '''_''''''_group_''''''_''' -- 指定されたカラムで、表示がグループ化されます。各グループは、それぞれセクションヘッダとクエリ結果の表を持ちます。
     146 * '''_''''''_color_''''''_''' -- 1 から 5 の数値である必要があります。値によって、あらかじめ定義された色付けが行われます。一般的な使用法は、優先度別の色付けです。
     147 * '''_''''''_style_''''''_''' -- CSS 形式でレコードを整形できます。
    148148
    149 '''Example:''' ''List active tickets, grouped by milestone, colored by priority''
     149'''例:''' ''マイルストーン別未解決チケット (優先度別色付け)''
    150150{{{
    151151SELECT p.value AS __color__,
     
    159159}}}
    160160
    161 '''Note:''' A table join is used to match ''ticket'' priorities with their
    162 numeric representation from the ''enum'' table.
     161'''Note:''' ''ticket'' 表の優先度に対応する数値は、 ''enum'' 表を結合することで
     162取り出しています。
    163163
    164 === Changing layout of report rows ===
    165 By default, all columns on each row are display on a single row in the HTML
    166 report, possibly formatted according to the descriptions above. However, it's
    167 also possible to create multi-line report entries.
     164=== 行単位のレイアウト変更 ===
     165デフォルトでは、全てのカラムで1行を使い、上記の指定がされていれば、
     166フォーマットされた形式で HTML に表示されます。それだけでなく、
     167これから挙げる指定によって、複数行にわたってのレイアウトを行うことができます。
    168168
    169  * '''column_''' -- ''Break row after this''. By appending an underscore ('_') to the column name, the remaining columns will be be continued on a second line.
     169 * '''column_''' -- ''改行''。 カラム名の語尾にアンダースコア ('_') を付与した場合、以降のカラムは次の行で表示されます。
    170170
    171  * '''_column_''' -- ''Full row''. By adding an underscore ('_') both at the beginning and the end of a column name, the data will be shown on a separate row.
     171 * '''_column_''' -- ''全行表示''。 カラム名の前後にアンダースコア ('_') を付与した場合、そのカラムは続く行で全てのカラム幅を使って表示されます。
    172172
    173  * '''_column'''  --  ''Hide data''. Prepending an underscore ('_') to a column name instructs Trac to hide the contents from the HTML output. This is useful for information to be visible only if downloaded in other formats (like CSV or RSS/XML).
     173 * '''_column'''  --  ''データを非表示にする''。 カラム名の語頭にアンダースコア ('_') を付与した場合、 HTML 出力では非表示になります。これは (CSV や RSS のような) 別フォーマットでのダウンロード時にだけ見たい情報であるときに使います。
    174174
    175 '''Example:''' ''List active tickets, grouped by milestone, colored by priority, with  description and multi-line layout''
     175'''例:''' ''アクティブなチケットを、マイルストーンでグループ化し、優先度で色付け、チケットの説明を multi-line レイアウトでリスト表示する''
    176176
    177177{{{
     
    181181          WHEN 'daniel' THEN 'font-weight: bold; background: red;'
    182182          ELSE '' END) AS __style__,
    183        t.id AS ticket, summary AS summary_,             -- ## Break line here
     183       t.id AS ticket, summary AS summary_,             -- ## ここで改行する
    184184       component,version, severity, milestone, status, owner,
    185        time AS created, changetime AS modified,         -- ## Dates are formatted
    186        description AS _description_,                    -- ## Uses a full row
    187        changetime AS _changetime, reporter AS _reporter -- ## Hidden from HTML output
     185       time AS created, changetime AS modified,         -- ## 日付形式で整形
     186       description AS _description_,                    -- ## 全行を使用して表示
     187       changetime AS _changetime, reporter AS _reporter -- ## HTML 出力では表示しない
    188188  FROM ticket t,enum p
    189189  WHERE t.status IN ('new', 'assigned', 'reopened')
     
    194194
    195195----
    196 See also: TracTickets, TracQuery, TracGuide
     196参考: TracTickets, TracQuery, TracGuide