Go to the first, previous, next, last section, table of contents.


Reporting on groups of Problem Reports

There currently exists no separate reporting mechanism in GNATS from query-pr. However, the `-q' and `-i' options to query-pr allow for easy reporting.

For example, a report on the current open Problem Reports in the database can be obtained using awk with

query-pr -q | awk '{print $3 "/" $1 ": " $4}'

which yields a list of the form

category/gnats-id: state
etc...

For example:

sprockets/123: open
widgets/456: analyzed
etc...

The `-i' option to query-pr yields output delimited by pipes (`|'). This results in the following:

gnats-id|category|synopsis|confidential|\
severity|priority|responsible|state|class|\
submitter-id|arrival-date|originator|release

A report on Problem Reports in the database that are currently `open' or `analyzed' might resemble the following (the example is split into two lines in order to fit onto the page; it is intended to be typed on one command line):

query-pr -i -s "o|a" | \
  awk -F\| '{print $1 "  " $2 "  " $8 "  " $3}'

which yields

gnats-id  category  state  responsible synopsis
etc...

For example:

123  sprockets  1  fred    The sprockets program gives bad output
456  widgets    2  barney  The foo widget doesn't work with 'bar'
789  widgets    1  wilma   The 'baz' widget is broken

When you use the `-i' option, `query-pr' outputs the ENUMERATED fields in the database, namely `>Severity:', `>Priority:', `>State:', and `>Class:', as numbers rather than text. In the example above, a `>State:' value of `1' means `open', `2' means `analyzed', and so forth. ENUMERATED fields are output according to the following paradigm:

    >Severity:                   >Priority:
critical        1             high            1
serious         2             medium          2 
non-critical    3             low             3

     >State:                      >Class:
open            1             sw-bug          1
analyzed        2             doc-bug         2
suspended       3             support         3
feedback        4             change-request  4
closed          5             mistaken        5
                              duplicate       6

This makes sorting on these values easy, when combined with sort. It is left as an exercise for the reader to figure out how to do this.


Go to the first, previous, next, last section, table of contents.