TRAC experience (4) Report

Source: Internet
Author: User
TRAC experience (1) Miscellaneous
TRAC experience (2) Miscellaneous
TRAC experience (3) Workflow
TRAC experience (4) Report
TRAC experience (5) plug-ins
About TRAC experience (end 6) plug-ins
========================
TRAC experience (4) Report

Lai Yonghao (http://laiyonghao.com)

Recently, I spent some time tossing the user experience of TRAC. Hack has a plug-in to implement the owner's choice. The key point is to display the Chinese nickname entered by the user, in this way, you can easily find people. But today we will not talk about this. We will have two flowers and one table and continue to talk about the planned reports.
The report function of TRAC is powerful and flexible. In addition to the various reports provided by TRAC, you can also customize them freely. I don't know how other people define the term TRAC report. However, I regard the roadmap of TRAC and the report statement as a report, let's talk about it separately.
Roadmap)

An important concept in the roadmap is the milestone (milestone). A milestone can specify an expiration date and a completion date to indicate the expected completion time and the actual completion time, respectively, we can see whether there is any delay or advance. Each task list (ticket) has a milestone field for you to set its milestones. optimistically, if you can analyze and refine the project's requirements, defects, and improvements into multiple ticket and set milestones, the entire project plan will jump to the paper.
As the project progresses, some task orders are constantly resolved, new task orders are constantly added, and some tasks are constantly transferred to other milestones, in fact, the task orders in milestones are constantly changing. How can we quickly and intuitively understand the progress and health of milestones? A roadmap report is used to solve this problem.

For example, you can see three milestones and the status of the task list that belong to these milestones. In the upper-right corner of the page, you can also view the completed milestones and make some settings to improve the user experience, such as hiding milestones without deadline. The task list status groups of these milestones have been customized, so you can see the number of task lists in the closed, tested, and developed states. Click the status group, you can access the task list report of this group. Custom status groups are completed by editing TRAC. ini. First, make sure that TRAC. ini contains the following section:

[milestone]stats_provider = DefaultTicketGroupStatsProvider

Add a section named milestone-groups. The definition is as follows:

[Milestone-groups] closed = closedclosed. order = 1closed. query_args = Group = resolutionclosed. overall_completion = trueclosed. label = disabled resolved = resolvedresolved. order = 2resolved.css _ class = newresolved. label = active = * active in the test. order = 3active.css _ class = openactive. label = under development

Closed, resolved, and active can be defined at will, and they represent the group name (groupname ). The value of each group name is a list separated by commas (,). Each element is a state name. You can also use an asterisk (*), it matches all unspecified states. Each group has five attributes: Order, query_args, overall_completion, label, and css_class. Their meanings are as follows:

  1. Order: determines the display order in the progress bar. The smaller the value, the more advanced the value;
  2. Label: The name displayed;
  3. Css_class: CSS style class name, which can be defined by adding table. Progress TD. <class> this form of selector;
  4. Query_args: As mentioned above, clicking the progress bar color block or label will open a task list query report. The results of this parameter will be appended to the URL of the report, which is used to customize reports, such as reload grouping, you can use closed. query_args = Group = resolution;
  5. Overall_completion: A boolean parameter that identifies whether the group is in the completed state when the completion degree is calculated.
View the report built-in report

TRAC has eight basic reports built in, basically meeting the needs of general projects. However, commercial projects are no better than open-source projects. The boss or project manager often wants to know the progress of projects or milestones in a more convenient way. At this time, you need to customize reports. But before that, let's take a look at the built-in 8 report functions first:

  1. Active tickets: A non-closed task list
  2. Active task orders are divided by version (Active tickets by version): the group mode is version.
  3. Active task orders are classified by milestones (Active tickets by milestone): The grouping method is a milestone
  4. The accepted active task list is divided by the owner (accepted, active tickets by owner): the task list in the accepted state. The task list is grouped by the owner.
  5. The fully-described list of accepted active tasks is divided by the owner (accepted, active tickets by owner (full description): The task list in the accepted status, which is grouped by the owner, explicitly complete description field
  6. All Task tickets (including closed ones) are classified by milestone (all tickets by milestone (including closed): All Task tickets whose grouping method is milestone (including closed ones)
  7. My tickets: My task ticket is owned by the owner.
  8. Active task list, my priority (Active tickets, mine first): All task lists, but the owner is at the top of my list.

To facilitate viewing our business progress, I have also customized five reports, as shown below:

  1. Active task list for recent changes: obtain the latest project Trend
  2. Active user list (by owner): obtains information about the team member's work pressure.
  3. My task list: Obtain the current situation of the task list I initiated
  4. Solved task list: Understand the task list that enters the resolved status but has not passed the QA personnel Detection
  5. Closed task list: Obtain the closed task list, such as understanding their solutions

By default, new reports are placed after basic reports. For better experience, you can change the IDs of these reports in the database to re-sort them. For example:

update report set id=5 where id=3;

After execution, you can forward the previously ranked reports (but the ID is the primary key, so pay attention to its uniqueness ).
Custom Query

TRAC reports are highly customizable and provide Gui-based custom queries and SQL query-based new reports. Here we will first talk about basic custom queries, then go deep into the SQL query statement and its precautions.
Click the custom query link on the upper left and right of the Report page to go to the custom query page. Generally, the master and status fields have been added to the filter, the current filtering result is shown below, for example:

The minus sign (-) button at the bottom of the filter word can be used to delete this filter. You can select or enter a filter field to easily set the filter condition. The "and" and "or" drop-down boxes under the filter can be used to add new filter fields, such as types and reporters.
The multiple-choice box for column text is used to select the columns to be displayed in the report. The key is the "result group" parameter, which can be grouped by different ticket fields, generally, select the owner or status.
After selecting the parameters, you can click the "Update result" button to view the results. If you are satisfied, click "Save query" at the bottom of the page to add the report to the report page.

Create report

Custom queries are convenient, but some flexibility is lost. TRAC reports allows you to customize reports using standard SQL select statements. Click the "Create report" button at the bottom of the Report page to go to the SQL or tracquery editing page, define the title and description, enter the SQL statement in the query box, and save the report. For example, the query of the "All active task lists sorted by priority and time" report is as follows:

SELECT id AS ticket, status, severity, priority, owner,       time AS created, summary FROM ticket  WHERE status IN ('new', 'assigned', 'reopened')  ORDER BY priority, time

This complex method is used to obtain richer capabilities, such as using variables in queries. This rule solves the problem where words starting with $ are considered as variables, such:

SELECT id AS ticket,summary FROM ticket WHERE priority=$PRIORITY

This $ priority is a variable, and its value is passed in by the URL on the report page:

http://trac.edgewall.org/reports/14?PRIORITY=high

In addition to quantification, there are also some default special variables (or constants). Now there is only one, $ user. When using these special variables, you need to change the URL and TRAC will automatically pass its value, if the query owner is his/her own task list:

SELECT id AS ticket,summary FROM ticket WHERE owner=$USER

In addition, TRAC also has its own black magic-Automatic formatting of some fields, mainly including:

  • Ticket: a URL hyperlink with ticket
  • Created, modified, date, time: format the field as date and (or) Time
  • Description: processing with the Wiki Engine

There are also the ID and realm fields, but these two fields are not much, we will not introduce them. In addition to automatic field formatting, you can also customize the column format and change the layout of the report line.
Reports in Wiki

Sometimes we need to reference some reports on the wiki page. In this case, we can use tracquery (it can also replace SQL in creating a report ). It is used by Trac to display task lists that meet specific needs. For example, you can write the following statement in the Wiki:

[Query: Status = new | assigned | reopened & version = 1.0 corresponds to the active task list of version 1.0]

So the Wiki engine will render it as a pointing http://www.example.com/trac/query? Status = new & status = assigned & status = reopened & version = 1.0 & Order = Priority hyperlink (the anchor text corresponds to the active task list of version 1.0 ), we can see that the URL parameter is the value of the query statement.
The powerful wiki engine of TRAC can also use the [[ticketquery] macro to embed the entire report into the Wiki, for example:

[[TicketQuery(max=3,status=closed,order=id,desc=1,format=table,col=resolution|summary|owner|reporter,rows=description)]]

The preceding macro indicates that the first three closed task orders are displayed in reverse order by ID. Each Task List displays the resolution, summary, and owner) report, and then display the description of the task list in another line ).

To be continued...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.