バージョン 2 から バージョン 3 における更新: TracDoc/QueryChart/En
- 更新日時:
- 2008/12/06 15:08:46 (16 年 前)
凡例:
- 変更なし
- 追加
- 削除
- 変更
-
TracDoc/QueryChart/En
v2 v3 1 = バグ収束曲線やバーンダウンチャートを描画するQuery Chart マクロ=1 = Query Chart macro that draws in bug settling curve and Barndaunchart = 2 2 == Description == 3 チケットの件数をカウントして、バグ収束曲線やバーンダウンチャートを描画するWikiマクロです。 3 This is Wiki macro that counts the number of tickets, and draws in the bug settling curve and [[BR]]Barndaunchart. 4 4 5 Wikiマクロなので、Wikiに貼り付けるだけでなく、タイムラインやレポートと一緒に表示することで進捗をかっこよく表示することができます。 5 Progress can be displayed good-looking by it not only puts on Wiki because it is Wiki macro but also displaying it with the time line and the report. 6 6 7 また、このプラグインには、チケットのステータスが変化した日を、カスタムフィールドに保存する機能を同梱しています。これとグラフを組み合わせることで、チケットがクローズした日をグラフにすることができます。 7 Moreover, the function to preserve in the custom field is bundled to this plug-in on the day when the status of the ticket changed. The day when the ticket closed can be made a graph by combining this with the graph. 8 8 9 9 == ScreenShot == 10 [[Image( wiki:TracDoc/QueryChart:screenshot.png)]]10 [[Image(http://weekbuild.sakura.ne.jp/trac/raw-attachment/wiki/TracDoc/QueryChart/screenshot.png)]] 11 11 12 12 == Requament == 13 このプラグインはTrac 0.11用です。 13 This plug-in is for Trac 0.11. 14 14 15 15 == Install == 16 Subversion を使用して、CodeReposからチェックアウトしてください。コマンドラインクライアントでは、以下のようにします。 16 Please check it out from [http://coderepos.org/share/wiki CodeRepos] by using Subversion. In the command line client, as follows is done. 17 17 18 18 {{{ … … 20 20 }}} 21 21 22 /trunkに移動して以下のコマンドを実行して下さい:22 Please move to /trunk and execute the following commands. : 23 23 24 24 {{{ … … 26 26 }}} 27 27 28 distフォルダが作成されます。その中にある*.eggファイルを、TracEnvのplugins ディレクトリにコピーしてください。 28 The dist folder is made. Please copy *.egg file that is onto the plugins directory of TracEnv in that. 29 29 30 30 == Usage == 31 31 === Macro === 32 以下のようにwikiにマクロを記載することで、グラフを表示します。 32 The graph is displayed by describing the macro to wiki as follows. 33 33 34 34 {{{ … … 38 38 args: 39 39 40 * query: チケットの検索条件。以下の3通りの記載が可能です。41 * TicketQueryマクロのクエリ言語方式: [[BR]]以下のように頭に?をつけずに条件を書きます。詳しくは[wiki:TracQuery#QueryLanguage クエリ言語]を参照。 [[BR]]!query:status=new|assigned&version^=1.042 * カスタムクエリでURLに表示される方式: [[BR]]以下のように、頭に?(:も忘れずに)をつけて各条件を&で区切ります。カスタムクエリの画面で条件を指定して、URLの部分を貼り付けるとイイでしょう。 [[BR]]!query:?status=new&status=assigned&version=^1.043 * 省略する方式: [[BR]]カスタムクエリから作成したレポートの説明欄に貼り付ける場合(つまりブラウザのURLにクエリが表示されている状態)のみ、省略が可能です。省略すると画面で指定した検索条件となります。省略する場合はこの項目(query:…)自体を省略してください。44 * col: 対象とする項目。複数記載すれば複数本線を引ける。少なくとも1つ必須。複数指定する場合はcol=xxx,col=yyyとカンマ区切りで記載してください。項目名はフィールド名(Trac内部のフィールド名)とラベル(表示されている項目名)のどちらでも指定可能です。45 * per:(=day,week,free) 集計単位。未指定ならweek46 * start: グラフの左端の日。未指定ならチケットの最も過去の日。yyyy/mm/dd形式47 * end: グラフの右端の日。未指定ならチケットの最も最近の日。yyyy/mm/dd形式48 * width: グラフの幅。px単位で指定。未指定なら536px49 * height: グラフの高さ。px単位で指定。未指定なら300px50 * upper: アップチャートを書く(バグ収束曲線等)。指定しない場合はダウンチャート51 例:40 * query: Search condition of ticket. The following three kinds of can be described. 41 * [http://trac.edgewall.org/wiki/TracQuery#QueryLanguage Query language] notation of TicketQuery macro: [[BR]]Write the condition without applying ? to the head. Refer to the [http://trac.edgewall.org/wiki/TracQuery#QueryLanguage Query language] for details. [[BR]]!query:status=new|assigned&version;^=1.0 42 * Notation displayed in URL with custom query: [[BR]]Write conditions delimited by & applying ?(Without forgetting :) to the head as follows. It might be good to put the part of URL specifying the condition on the screen of custom query. [[BR]]!query:?status=new&status;=assigned&version;=^1.0 43 * Omitte: [[BR]]It is possible to omit it only when putting it on the column the explanation of the report made from custom query (which displayed in address field of a browser). It becomes a search condition specified the omission on the screen. Please omit this item (query:…) when omitting it. 44 * col: Targeted item. Please describe by col=xxx, col=yyy, and switching off the comma district when you specify the plural. The item name can specify both the field name (name of the field in Trac) and the label (displayed item name). 45 * per:(=day,week,free) Unit of total. Default is week. 46 * start: Day in left end of graph. If it is unspecification, it is the most past day of the ticket. yyyy/mm/dd form 47 * end: Day on right edge in graph. If it is unspecification, it is the most recent day of the ticket. yyyy/mm/dd form 48 * width: Width in graph. It specifies it by the unit of px. If it is unspecification, it is 536px. 49 * height: Height of graph. It specifies it by the unit of px. If it is unspecification, [[BR]]it is 300px. 50 * upper: The improvement chart is written (bug settling curve etc.). Down chart when not specifying it. 51 Example: 52 52 53 53 {{{ … … 56 56 57 57 === Status Logger and Admin Page === 58 T rac.iniにてステータスの優先順位と、保存するカスタムフィールドを設定することで、Ticketの変更時に自動的に設定したカスタムフィールドに日付が保存することができます。また、管理画面から一括して日付をセットすることができます。58 The date can be preserved in the custom field automatically set when Ticket is changed by setting the priority level of status and the preserved custom field with Trac.ini. Moreover, the date can be set from the management screen in bulk. 59 59 60 Tracではクローズしたチケットの差し戻しが可能なことに加え、Trac0.11以降では、ワークフローのカスタマイズが可能なため、「この日を完了日とする」みたいなルールを決める必要があります。このプラグインでは、「ステータスの発生順位」を決めてそれに従って日付をセットします。発生順位の高いものより前に発生順位の低いステータスにならないようにカスタムフィールドに日付がセットされます。 60 It is necessary to decide the rule like "This day is assumed to be a completion day" in Trac because customizing the work flow is possible since Trac0.11 in addition to possible sending back the closing ticket. In this plug-in, "Generation order of status" is decided and the date is set according to it. The date is set in the custom field so that the generation order should not become low status from the one with high generation order ahead. 61 61 62 デフォルトのワークフローでは、以下の優先順位でだいたいうまくいくと思います。(ちなみにチケットの作成日はカスタムフィールド用意しなくてもtimeという項目に入るので、コレ使う必要なし) 62 In the work flow of default, I think that it goes well roughly by the following priority levels. (By the way, because the date of the ticket enters the item named time even if the custom field is not prepared, it is unnecessary ) 63 63 64 64 (1)assigned (2)accepted (3)reopened (4)closed 65 65 66 たとえば、以下のように12/01にアサインした後、12/10にいきなりcloseしたとします。この場合、closedより発生順位の高いaccepted,reopenedにはclosedと同じ12/10の日付がセットされます。さらに、その後12/20にreopenしたとします。reopenedより発生順位の低いclosedは空にクリアされます。 66 For instance, it is assumed that close was suddenly done to 12/10 after assign is done to 12/01 as follows. In this case, the date of the same 12/10 as closed is set in accepted and reopened whose generation order is higher than closed. In addition, it is assumed that reopen was done to 12/20 afterwards. Closed whose generation order is lower than reopened is cleared to empty. 67 67 68 || ||assigned||accepted||reopened||closed|| 69 ||ある時点||2008/12/01||-||-||-|| 70 ||その後、12/10にいきなりcloseした||2008/12/01||2008/12/10||2008/12/10||2008/12/10|| 71 ||その後、12/20に差し戻し(reopen)した||2008/12/01||2008/12/10||2008/12/20||-|| 68 || ||assigned||accepted||reopened||closed || 69 ||Assigned at 12/01||2008/12/01||-||-||- || 70 ||Afterwards, closed at 12/10||2008/12/01||2008/12/10||2008/12/10||2008/12/10 || 71 ||Afterwards, reopened at 12/20||2008/12/01||2008/12/10||2008/12/20||- || 72 Next, please prepare the custom field to preserve the day of the generation of status. This need not prepare the sentence of all status. Please prepare only a necessary amount. 72 73 74 We will encourage to make it to the operation rule not input by the person so that this item may rewrite the value without permission in the plug-in. 73 75 74 次に、ステータスの発生日を保存するためのカスタムフィールドを用意してください。これは総てのステータスの文用意する必要はありません。必要な分だけ用意してください。 76 Please set which generation order and custom field to preserve it to order of the QueryChart category of trac.ini. Status is delimited by the comma according to the generation order, the custom field preserved in addition is delimited by the colon after status, and it specifies it. 75 77 76 なお、この項目はプラグインの方で勝手に値を書き換えるため、人は入力しない運用ルールにすることをおすすめします。 77 78 発生順位と、どのカスタムフィールドに保存するかをtrac.iniの[QueryChart]カテゴリのorderに設定してください。発生順位に従ってステータスをカンマで区切り、さらに保存するカスタムフィールドをステータスの後にコロンで区切って指定します。 79 80 たとえば、デフォルトワークフローの発生順位で、アサインした日をlast_assigned、完了日をlast_closedというカスタムフィールドに保存する場合は、以下のように指定します。ちなみに、カスタムフィールドを1つも指定しないと、日付は保存されません。 78 For instance, when last_assigned and the completion day are preserved in the custom field named last_closed, the day when assign was done is specified as follows by the generation order of the default work flow. By the way, if any custom field is not specified, the date is not preserved. 81 79 82 80 {{{ 83 [querychart] 84 order = assigned:last_assigned, accepted,reopened, closed:last_closed 81 [querychart]order = assigned:last_assigned, accepted,reopened, closed:last_closed 85 82 }}} 86 83 87 (4) 日付のセット 84 Please set the date for all tickets pushing the reset button of ticket system -> QueryChart from the management screen after the plug-in is put and trac.ini is set. It is preserved in the custom field that the date automatically specified when the ticket is preserved after that. (The date doesn't enter by the automatic operation when the ticket is changed by the TicketDelete plug-in and the BatchModify plug-in. Please set the date from the management screen again. ) 88 85 89 プラグインを入れてtrac.iniを設定した後、管理画面から、チケットシステム→QueryChartのリセットボタンを押して、全チケットに対して日付のセットを行ってください。それ以降はチケットの保存時に自動的に日付が指定したカスタムフィールドに保存されます。(TicketDeleteプラグインやBatchModifyプラグインでチケットを変更した場合は、自動で日付が入りません。再度管理画面から日付のセットを行ってください。) 86 [[Image(http://weekbuild.sakura.ne.jp/trac/raw-attachment/wiki/TracDoc/QueryChart/Image2.png)]] 90 87 91 [[Image(wiki:TracDoc/QueryChart:Image2.png)]] 88 The date is set by the rule set to all tickets that the button is pushed. (The day when status actually changed according to the change tracking of the ticket is set. ) 92 89 93 ボタンを押すと、全チケットに対して設定したルールで日付がセットされます。(チケットの変更履歴に従って実際にステータスが変化した日がセットされます) 94 95 なお、trac.iniの[QueryChart]カテゴリのorderを変更した場合は、このボタンを再度押して日付をセットし直してください。 90 When change order of the QueryChart category of trac.ini, try to set the date pushing this button again. 96 91 97 92 == License == 98 このプラグインのライセンスは修正BSDライセンスです。 93 The license of this plug-in is new BSD license. 99 94 100 このプラグインは、 [http://code.google.com/p/flot/ Flot] というライブラリを使用しています。FlotのライセンスははMIT Licenseです。 95 This plug-in uses the library named [http://code.google.com/p/flot/ Flot]. The license of Flot is MIT License.