[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The following programs comprise GNATS:
These tools are used by the maintainers of a body of work
(send-pr
is also used by the end users of the product).
send-pr
query-pr
edit-pr
view-pr
These tools are used by the GNATS administrator; see also GNATS Administration. For complete explanations of these utilities, see Administrative utilities.
mkcat
rmcat
gen-index
query-pr
and
edit-pr
(see section The index
file). Use
gen-index
to rebuild the index if it becomes corrupted, or if you
need a copy of the current index for some reason
(see section Regenerating the index).
mkdist
send-pr
for offsite
submitters of PRs (see section Configuring send-pr
for the outside world).
These tools are used internally by GNATS. You should not need to run these by hand. For complete explanations of these utilities, see Internal utilities.
queue-pr
file-pr
at-pr
pr-edit
edit-pr
to error-check and submit edited Problem Reports
(also see section Editing existing Problem Reports).
pr-addr
edit-pr
to retrieve correct addresses from the
`responsible' file.
See section Where GNATS lives.
2.1 Submitting Problem Reports 2.2 Editing existing Problem Reports 2.3 Querying the database 2.4 Viewing individual Problem Reports
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Use send-pr
to submit Problem Reports to the database.
send-pr
is both a shell script and a Lisp program for GNU
Emacs; both implementations provide a template for submitters to
complete. In most cases, send-pr
can determine intelligent
default values for several fields, partially automating the
bug-reporting process.
See section Configuring send-pr
for the outside world, for
information on distributing a version of send-pr
customized with
your site's configuration.
You can invoke send-pr
from a shell prompt, or from within
GNU Emacs using `M-x send-pr'.
2.1.1 Creating new Problem Reports 2.1.2 Using send-pr
from within EmacsUsing send-pr from within Emacs 2.1.3 Invoking send-pr
from the shellInvoking send-pr from the shell 2.1.4 Submitting a Problem Report via direct e-mail 2.1.5 Helpful hints
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Invoking send-pr
presents a PR template with a number of
fields already filled in. Complete the template as thoroughly as
possible to make a useful bug report. Submit only one bug with each PR.
A template consists of three sections:
send-pr
creates a standard mail header. send-pr
completes
all fields except the `Subject:' line with default values.
(See section Problem Report format.)
The default template contains your preconfigured `>Submitter-Id:'.
send-pr
attempts to determine values for the `>Originator:'
and `>Organization:' fields (see section Problem Report format). send-pr
will set the `>Originator:' field to
the value of the NAME
environment variable if it has been set;
similarly, `>Organization:' will be set to the value of ORGANIZATION
.
send-pr
also attempts to find out some information
about your system and architecture, and places this information in the
`>Environment:' field if it finds any.
You may submit problem reports to different Support Sites from the
default site by specifying the alternate site when you invoke
send-pr
. See section 2.1.3 Invoking send-pr
from the shell.
Each site
has its own list of categories for
which it accepts Problem Reports.
send-pr
also provides the mail header section of the template
with default values in the `To:', `From:', and
`Reply-To:' fields. The `Subject:' field is empty.
The template begins with a comment section:
SEND-PR: -*- send-pr -*- SEND-PR: Lines starting with `SEND-PR' will be removed SEND-PR: automatically as well as all comments (the text SEND-PR: below enclosed in `<' and `>'). SEND-PR: SEND-PR: Please consult the document `Reporting Problems SEND-PR: Using send-pr' if you are not sure how to fill out SEND-PR: a problem report. SEND-PR: SEND-PR: Choose from the following categories: |
and also contains a list of valid >Category:
values for the
Support Site to whom you are submitting this Problem Report. One (and
only one) of these values should be placed in the >Category:
field.
The mail header is just below the comment section. Fill out the `Subject:' field, if it is not already completed using the value of `>Synopsis:'. The other mail header fields contain default values.
To: support-site Subject: complete this field From: your-login@your-site Reply-To: your-login@your-site X-send-pr-version: send-pr 3.113 |
where support-site is an alias on your local machine for the Support Site you wish to submit this PR to.
The rest of the template contains GNATS fields. Each field is either automatically completed with valid information (such as your `>Submitter-Id:') or contains a one-line instruction specifying the information that field requires in order to be correct. For example, the `>Confidential:' field expects a value of `yes' or `no', and the answer must fit on one line; similarly, the `>Synopsis:' field expects a short synopsis of the problem, which must also fit on one line. Fill out the fields as completely as possible. See section Helpful hints, for suggestions as to what kinds of information to include.
In this example, words in italics are filled in with pre-configured information:
>Submitter-Id: your submitter-id >Originator: your name here >Organization: your organization >Confidential:<[ yes | no ] (one line)> >Synopsis: <synopsis of the problem (one line)> >Severity: <[non-critical | serious | critical](one line)> >Priority: <[ low | medium | high ] (one line)> >Category: <name of the product (one line)> >Class: <[sw-bug | doc-bug | change-request | support]> >Release: <release number (one line)> >Environment: <machine, os, target, libraries (multiple lines)> >Description: <precise description of the problem (multiple lines)> >How-To-Repeat: <code/input/activities to reproduce (multiple lines)> >Fix: <how to correct or work around the problem, if known (multiple lines)> |
When you finish editing the Problem Report, send-pr
mails it to
the address named in the `To:' field in the mail header.
send-pr
checks that the complete form contains a valid
`>Category:'.
If your PR has an invalid value in one of the ENUMERATED fields
(see section Problem Report format), send-pr
places the PR in
a temporary file named `/tmp/pbadnnnn' on your machine.
nnnn is the process identification number given to your current
send-pr
session. If you are running send-pr
from the
shell, you are prompted as to whether or not you wish to try editing the
same Problem Report again. If you are running send-pr
from
Emacs, the Problem Report is placed in the buffer
`*send-pr-error*'; you can edit this file and then submit it
with
M-x gnats-submit-pr |
Any further mail concerning this Problem Report should be carbon-copied to the GNATS mailing address as well, with the category and identification number in the `Subject:' line of the message.
Subject: Re: PR category/gnats-id: original message subject |
Messages which arrive with `Subject:' lines of this form are automatically appended to the Problem Report in the `>Audit-Trail:' field in the order received.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
send-pr
from within Emacs
You can use an interactive send-pr
interface from within GNU
Emacs to fill out your Problem Report. We recommend that you
familiarize yourself with Emacs before using this feature
(see section `Introduction' in GNU Emacs).
Call send-pr
with `M-x send-pr'.(1) send-pr
responds with a
Problem Report template preconfigured for the Support Site from which
you received send-pr
. (If you use send-pr
locally, the
default Support Site is probably your local site.)
You may also submit problem reports to different Support Sites from the
default site. To use this feature, invoke send-pr
with
C-u M-x send-pr |
send-pr
prompts you for the name of a site. site is
an alias on your local machine which points to an alternate Support
Site.
send-pr
displays the template and prompts you in the minibuffer
with the line:
>Category: other |
Delete the default value `other' in the minibuffer and
replace it with the keyword corresponding to your problem (the list of
valid categories is in the topmost section of the PR template). For
example, if the problem you wish to report has to do with the GNU C
compiler, and your support organization accepts bugs submitted for this
program under the category `gcc', delete `other' and then type
`gcc[RET]'. send-pr
replaces the line
>Category: <name of the product (one line)> |
in the template with
>Category: gcc |
and moves on to another field.
send-pr
provides name completion in the minibuffer. For
instance, you can also type `gc[TAB]', and send-pr
attempts to complete the entry for you. Typing `g[TAB]'
may not have the same effect if several possible entries begin with
`g'. In that case send-pr
cannot complete the entry because
it cannot determine whether you mean `gcc' or, for example,
`gdb', if both of those are possible categories.
send-pr
continues to prompt you for a valid entry until you
enter one.
send-pr
prompts you interactively to enter each field for
which there is a range of specific choices. If you attempt to enter a
value which is not in the range of acceptable entries, send-pr
responds with `[No match]' and allows you to change the entry
until it contains an acceptable value. This avoids unusable information
(at least in these fields) and also avoids typographical errors which
could cause problems later.
send-pr
prompts you for the following fields:
>Category:
>Confidential: (default: no)
>Severity: (default: serious)
>Priority: (default: medium)
>Class: (default: sw-bug)
>Release:
>Synopsis: (this value is copied to |
After you complete these fields, send-pr
places the cursor in
the `>Description:' field and displays the message
To send the problem report use: C-c C-c |
in the minibuffer. At this point, edit the file in the main buffer to reflect your specific problem, putting relevant information in the proper fields.
`send-pr' provides a few key bindings to make moving around in a template buffer more simple:
C-c C-f
M-x change-field
edit-pr
prompts you for a
new value.
M-C-b
M-x gnats-backward-field
M-C-f
M-x gnats-forward-field
M-p
M-x gnats-previous-field
M-n
M-x gnats-next-field
send-pr
takes over again when you type `C-c C-c' to send the
message. send-pr
reports any errors in a separate buffer, which
remains in existence until you send the PR properly (or, of course,
until you explicitly kill the buffer).
For detailed instructions on using Emacs, see section `Introduction' in GNU Emacs.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
send-pr
from the shell
send-pr [ site ] [ -f problem-report | --file problem-report ] [ -t mail-address | --to mail-address ] [ --request-id ] [ -L | --list ] [ -P | --print ] [ -V | --version] [ -h | --help ] |
site is an alias on your local machine which points to an address
used by a Support Site. If this argument is not present, the default
site is usually the site which you received send-pr
from,
or your local site if you use GNATS locally.
Invoking send-pr
with no options calls the editor named in your
environment variable EDITOR
on a default PR template. If the
environment variable PR_FORM
is set, its value is used as a file
name which contains a valid template. If PR_FORM
points to a
missing or unreadable file, or if the file is empty, send-pr
generates an error message and opens the editor on a default template.
-f problem-report
--file problem-report
send-pr
sends the contents of the file without
invoking an editor. If problem-report is `-',
send-pr
reads from standard input.
-t mail-address
--to mail-address
send-pr
is configured. This option is not recommended;
instead, use the argument site on the command line.
-c mail-address
--cc mail-address
Cc:
header field of the message
to be sent.
--request-id
>Submitter-Id:
to the Support Site.
-L
--list
>Category:
values on standard output.
No mail is sent.
-s severity
--severity severity
>Severity:
field to severity.
-P
--print
PR_FORM
is set in your
environment, the file it specifies is printed. If PR_FORM
is not
set, send-pr
prints the standard blank form. If the file
specified by PR_FORM
doesn't exist, send-pr
displays an
error message. No mail is sent.
-V
--version
send-pr
version number and a usage summary. No mail
is sent.
-h
--help
send-pr
. No mail is sent.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
send-pr
, there is another way to submit a problem
report. You can simply send an e-mail message to the support site.
To do this, look at the address in the `To:' field of the send-pr
template. When you send unformatted e-mail to this address, GNATS
processes the message as a new problem report, filling in as many fields from
defaults as it can:
Synopsis
Submitter ID
Description
Other fields, such as category, version, severity, etc. are set to default values (if the GNATS administrator has set them).
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
There is no orthodox standard for submitting effective bug reports,
though you might do well to consult the section on submitting bugs for
GNU gcc
in section `Reporting Bugs' in Using and Porting GNU CC, by Richard Stallman. This section contains
instructions on what kinds of information to include and what kinds of
mistakes to avoid.
In general, common sense (assuming such an animal exists) dictates the kind of information that would be most helpful in tracking down and resolving problems in software.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Use edit-pr
to make changes to existing PRs in the database.
edit-pr
is both a shell script and a Lisp program for GNU
Emacs. Both implementations are essentially identical, though the Emacs
interface provides interactive prompting for some of the fields.
edit-pr
first examines the PR you wish to edit and locks it if it
is not already locked. This is to prevent you from editing a PR at the
same time as another user. If the PR you wish to edit is already in the
process of being edited, edit-pr
tells you the name of the person
who owns the lock.
You may edit any field in the database that you wish. We recommend that you avoid deleting any information in the TEXT and MULTITEXT fields (such as `>Description:' and `>How-To-Repeat:' (see section Problem Report format). We also recommend that you record the final solution to the problem in the `>Fix:' field for future reference.
If you change the `>Responsible:' field, edit-pr
prompts you
to supply a reason for the change. edit-pr
then mails copies of
the change message to the previous responsible party, and to the new
responsible party. The change is then recorded in the
`>Audit-Trail:' section of the PR as follows:
Responsible-Changed-<From>-<To>
: The value change, supplied
edit-pr
.
Responsible-Changed-By
: Your name here, supplied
edit-pr
.
Responsible-Changed-When
: The current date, supplied
edit-pr
.
Responsible-Changed-Why
: Your reason for the change; you
If you change the `>State:' field, you are prompted to supply a reason for the change. Copies of the change message are then mailed to the responsible party, and to the original submitter of the Problem Report. The change is then recorded in the `Audit-Trail' section of the PR as follows:
State-Changed-<From>-<To>
: The value change, supplied
edit-pr
.
State-Changed-By
: Your name here, supplied
edit-pr
.
State-Changed-When
: The current date, supplied
edit-pr
.
State-Changed-Why
: Your reason for the change; you are
The PR is then resubmitted to the database, and the index is updated
(see section The index
file). For information on
pr-edit
, the main driver for edit-pr
, see Internal utilities.
2.2.1 Using edit-pr
from within Emacs2.2.2 Invoking edit-pr
from the shell
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
edit-pr
from within Emacs
Call edit-pr
from within Emacs with M-x
edit-pr
(2).
When edit-pr
prompts you for a PR identification number, type the
number of the PR you wish to edit.
If the PR is locked, Emacs announces the login name of the person who
has locked the file. If not, M-x edit-pr
locks the PR, loads
it into a buffer named `*edit-pr*', and places the cursor in the
`>Number:' field. (Do not change this field.)
Edit the PR to reflect correct information. Resubmit the PR to the database using `C-c C-c' (see below).
The easiest way to edit a PR from Emacs is to use the special key bindings provided. These are:
C-c C-c
M-x gnats-submit-pr
C-x C-s
M-x save-buffer
C-x k
M-x gnats:kill-buffer (use this only with Emacs 18)
M-x kill-buffer
C-c C-u
M-x unlock-pr
C-c C-q
M-x unlock-buffer
C-c C-e
M-x edit-pr
edit-pr
in a new buffer.
C-c C-a
M-x gnats-mail-reply
C-c RET
C-c C-m
M-x gnats:mail-other-window
C-c C-r
M-x gnats:responsible-change-from-to
edit-pr
prompts you for
the new responsible person, and for a message describing the reason for
the change. When you type `C-c C-c' to resubmit the PR, the
cursor is placed in a mail buffer containing a copy of the change. You
can then edit this buffer and type `C-c C-c' again to send the
mail.
C-c C-s
M-x gnats:state-change-from-to
edit-pr
prompts you for the
new state, and for a message describing the reason for the change. When
you type `C-c C-c' to resubmit the PR, the cursor is placed in
a mail buffer containing a copy of the change. You can then edit this
buffer and type `C-c C-c' again to send the mail.
C-c C-t
M-x gnats:category-change-from-to
edit-pr
prompts
you for the new category. edit-pr
also prompts you with the
question
Update the >Responsible field? |
Type `y' to change the value of the `>Responsible:' field to the name of the party responsible for the new category. Type `n' to keep the current value of `>Responsible:'.
C-c C-y
M-x gnats:severity-change-from-to
edit-pr
prompts you for the
new severity, and for a message describing the reason for the change. When
you type `C-c C-c' to resubmit the PR, the cursor is placed in
a mail buffer containing a copy of the change. You can then edit this
buffer and type `C-c C-c' again to send the mail.
C-c C-p
M-x gnats:priority-change-from-to
edit-pr
prompts you for the
new priority, and for a message describing the reason for the change. When
you type `C-c C-c' to resubmit the PR, the cursor is placed in
a mail buffer containing a copy of the change. You can then edit this
buffer and type `C-c C-c' again to send the mail.
C-c C-f
M-x gnats:change-field
edit-pr
prompts you for a
new value. If you use
C-u C-c C-f or C-u M-x change-field |
you are prompted for a field to change.
M-C-b
M-x gnats-backward-field
M-C-f
M-x gnats-forward-field
M-p
M-x gnats-previous-field
M-n
M-x gnats-next-field
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
edit-pr
from the shell
The usage for the edit-pr
shell script is:
edit-pr gnats-id [ -V | --version ] [ -h | --help ] |
You must first determine which PR you want to edit. The options are:
-V or --version
edit-pr
.
-h or --help
edit-pr
.
edit-pr
calls the editor specified in your environment
variable EDITOR
on a temporary copy of that PR. (If you don't
have the variable EDITOR
defined in your environment, the default
editor vi
is used.)
Edit the PR, changing any relevant fields or adding to existing
information. When you exit the editor, edit-pr
prompts you on
standard input for a reason if you've changed either the
`>Responsible:' field or the `>State:' field. edit-pr
tracks the information you provide when changing either of these two
fields, along with the change that occurred, your name, and the time of
change in the `>Audit-Trail:' field.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Obtain information from the database by using the program
query-pr
. query-pr
uses search parameters you provide
to find matching Problem Reports in the database. You can invoke
query-pr
from the shell or from within Emacs. query-pr
uses the same arguments whether it is invoked from the shell or from
Emacs.
All arguments and options to query-pr
are optional. If you do
not specify a PR identification number and do not give any search
parameters, query-pr
displays the entire database. All arguments
are considered identification numbers of Problem Reports to display.
Any number of options can be given (though some make no sense when
specified on the same command line); all are connected with a logical
AND
.
2.3.1 Invoking query-pr
2.3.2 Example queries 2.3.3 Reporting on groups of Problem Reports
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
query-pr
From the shell, simply type query-pr, followed by any search
parameters you wish to exercise. From Emacs, type M-x
query-pr. query-pr
prompts you for search parameters in the
minibuffer.
query-pr
can also be accessed by electronic mail, if your version
of GNATS is configured for this. To use this feature, simply send
mail to the address `query-pr@your-site' with command
line arguments or options in the `Subject:' line of the mail
header. GNATS replies to your mail with the results of your query.
The default settings for the query-pr
mail server are
--restricted --state="open|analyzed|feedback|suspended" |
To override the `--state' parameter, specify
`--state=state' in the Subject:
line of the mail
header. You can not query on confidential Problem Reports by mail.
The usage for query-pr
is:
query-pr [ gnats-id ] [ -c category | --category=category ] [ -y synopsis | --synopsis=synopsis ] [ -s state | --state=state ] [ -r responsible | --responsible=responsible ] [ -S submitter | --submitter=submitter ] [ -C [ yes | no ] | --confidential=[ yes | no ] ] [ -e severity | --severity=severity ] [ -p priority | --priority=priority ] [ -A release | --release=release ] [ -o outfile | --outfile=outfile ] [ -O originator | --originator=originator ] [ -L class | --class=class ] [ -b date | --arrived-before=date ] [ -a date | --arrived-after=date ] [ -B date | --modified-before=date ] [ -M date | --modified-after=date ] [ -z date | --closed-before=date ] [ -Z date | --closed-after=date ] [ -t text | --text=text ] [ -m text | --multitext=text ] [ -R | --restricted ] [-x | --skip-closed ] [ -F | --full ] [ -q | --summary ] [ -i | --sql ] [ -P | --print-path ] [ -d directory | --directory=directory ] [ -G | --list-config ] [ -j | --list-categories ] [ -k | --list-responsible ] [ -l | --list-submitters ] [ -J | --list-classes ] [ -T | --list-states ] [ -V | --version ] [ -h | --help ] |
If you run query-pr
from within Emacs, you can use
C-x ` or M-x next-error |
to scroll through Problem Reports one by one after the search is finished.
The following arguments and options specify search criteria. The lack of a criterion indicates that all values for the corresponding field are valid for the search. Regular expressions may be used as arguments to search criteria options; see Querying using regular expressions.
Using an argument to query-pr
specifies the most stringent search
criteria, that of a single PR.
gnats-id
-c category
--category=category
-y synopsis
--synopsis=synopsis
-s state
--state=state
This field may be searched using regular expressions. See section Querying using regular expressions. Also see Example queries.
-r responsible
--responsible=responsible
-S submitter
--submitter=submitter
-C [yes | no]
--confidential=[yes | no]
-e severity
--severity=severity
-p priority
--priority=priority
-O originator
--originator=originator
-A release
--release=release
-L class
--class=class
-b date
--arrived-before=date
-a date
--arrived-after=date
-B date
--modified-before=date
-M date
--modified-after date
-z date
--closed-before=date
-Z date
--closed-after date
-k class
--class=class
-t text
--text=text
Submitter-Id Originator Synopsis Category Release Responsible Arrival-Date Last-Modified Closed-Date |
See section Querying using regular expressions.
-m text
--multitext=text
Organization Environment Description How-To-Repeat Fix Audit-Trail Unformatted Release-Note |
See section Querying using regular expressions.
Queries using this option can be very slow. This is the only option
that does not reference the index, so queries using it finish much
faster if you also use another search criterion that is part of
the index (see section The index
file).
-R
--restricted
query-pr --confidential=no |
and also disallows the use of the options
`--outfile=outfile' and
`--directory=directory'. This option is used with the
mail-query
tool.
-x
--skip-closed
Use the following options to select the format in which the Problem Report is printed. Use only one of these options for a given search. If you do not specify one of these options, a header(3) for the Problem Reports meeting the search criteria is printed.
-F
--full
-q
--summary
Number Responsible Category State Severity Priority Submitter-Id Synopsis |
-i
--sql
`query-pr -i' outputs the following fields, in order (again, the fieldname delimiters `>' and `:' have been omitted):
Number Category Synopsis Confidential Severity Priority Responsible State Class Submitter-Id Arrival-Date Originator Release Last-Modified Closed-Date |
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. See section Reporting on groups of Problem Reports, for details.
-I
--sql2
query-pr
also accepts the following options:
-P
--print-path
query-pr
used to find the current PR. A
line of the form `directory/number:number' is
printed before each PR. This option is automatically used from within
Emacs to facilitate scrolling through groups of PRs with C-x `.
-d directory
--directory=directory
-o outfile
--output=outfile
-V
--version
query-pr
.
-h
--help
query-pr
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The following simple query:
query-pr --category=rats --responsible=fred --state=analyzed |
yields all PRs in the database which contain the field values:
>Category: rats and >Responsible: fred and >State: analyzed |
The following query:
query-pr --state="o|a" |
yields all PRs in the database whose `>State:' values match either `open' or `analyzed' (see section Querying using regular expressions. This search is useful as a daily report that lists all Problem Reports which require attention.
The report can be further altered using an alternate output format for
query-pr
; see Reporting on groups of Problem Reports. A more fine-grained report may be obtained by specifying more
search parameters, e.g. narrowing the search down by
`>Submitter:' or by `>Responsible:'.
The following query:
query-pr --text="The quick.*brown fox" |
yields all PRs whose TEXT fields contain the text `The quick' followed by `brown fox' within the same field. See section Querying using regular expressions.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Currently, query-pr
is the only reporting mechanism in GNATS.
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|\ last-modified|closed-date |
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 translations:
>Severity: >Priority: critical 1 high 1 serious 2 medium 2 non-critical 3 low 3 >State: >Class: (unknown) 0 sw-bug 1 open 1 doc-bug 2 analyzed 2 support 3 suspended 3 change-request 4 feedback 4 mistaken 5 closed 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.
Note that the mapping of states to numbers could be different at your site, if the GNATS administrator has changed the list of possible states (see see section The `states' file). The state "0" simply means GNATS does not recognize this PR's state. This situation can arise when a PR is assigned a state which is later removed from the list of possible states -- the PR retains the state, but GNATS no longer knows what that state means.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Use view-pr
from within Emacs to view individual Problem Reports.
Invoke view-pr
with
M-x view-pr |
You are prompted to enter a Problem Report identification number
(gnats-id). You can also invoke view-pr
with
C-u gnats-id M-x view-pr |
view-pr
allows you to view gnats-id. This is identical to
using
C-u gnats-id M-x query-pr |
except that you may choose to edit the PR at any time by pressing `e'.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |