[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Each type of field in a PR must be described with a field
section
in the ‘dbconfig’ file. These sections have the following general
structure:
field "fieldname" { description "string" [ field-options ... ] datatype [ datatype-options ... ] [ on-change { edit-options ... } ] } |
fieldname
is used as the field header in the PR. The characters >
and :
are used internally as field markers by GNATS, so they must
not be used in fieldnames.
The order in which the field
sections appear in the
‘dbconfig’ file determines the order in which they appear in the PR
text. There is no required order, unlike previous versions of GNATS
— the Unformatted field and multitext fields may appear anywhere in
the PR.
The following field-options
may be present within a field
section:
builtin-name "name"
Indicates that this field corresponds to one of the GNATS built-in fields.
GNATS has several fields which are required to be present in a PR, and this option is used to map their external descriptions to their internal usage. The external field names are:
arrival-date
The arrival date of the PR
audit-trail
The audit-trail recording changes to the PR
category
The category that the PR falls into
closed-date
The date that the PR was closed
confidential
If set to yes
, the PR is confidential
description
A description of the problem
last-modified
The date the PR was last modified
number
The PR’s unique numeric identifier
originator
The originator of the PR
priority
Priority of the PR
responsible
The person responsible for handling the PR
severity
Severity of the problem described by the PR
state
The current state of the PR
submitter-id
The user that submitted the PR
synopsis
The one-line description of the PR
unformatted
PR text which cannot be parsed and associated with other fields.
For these built-in fields, a matching field description must
appear in the ‘dbconfig’ file. Otherwise, the configuration will
be considered invalid, and errors will be generated from the
GNATS clients and gnatsd
. We also recommend that you
leave the actual fieldnames of these fields at their default values
(i.e. capitalized versions of their built-in names), since some
clients may depend on these names.
description "description text"
A one-line human-readable description of the field. Clients can use
this string to describe the field in a help dialog. The string is
returned from the FDSC command in gnatsd and is also available via the
--field-description
option in query-pr
.
This entry must be present in the field description, and there is no default value.
query-default exact-regexp | inexact-regexp
Used to specify the default type of searches performed on this field.
This is used when the ^
search operator appears in a query, and
is also used for queries in query-pr
that use the old
--field
query options.
If the option is not given, the default search is exact-regexp
.
textsearch
If this option is present, the field will be searched when the user
performs a --text
search from query-pr
. The field is
also flagged as a textsearch
field in the set of field flags
returned by the FIELDFLAGS
command in gnatsd.
By default, fields are not marked as textsearch
fields.
read-only
When this option is present, the field contents may not be edited — they must be set when the PR is initially created. In general, this should only be used for fields that are given as internal values rather than fields supplied by the user.
By default, editing is allowed.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by Chad Walstrom on March 3, 2015 using texi2html 1.82.