This file is indexed.

/usr/share/doc/gnats/gnats/dbconfig-recipes.html is in gnats 4.1.0-5.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 6.4.90, http://www.gnu.org/software/texinfo/ -->
<head>
<title>dbconfig recipes (Keeping Track)</title>

<meta name="description" content="dbconfig recipes (Keeping Track)">
<meta name="keywords" content="dbconfig recipes (Keeping Track)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Index.html#Index" rel="index" title="Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="index.html#Top" rel="up" title="Top">
<link href="Support.html#Support" rel="next" title="Support">
<link href="Regexps.html#Regexps" rel="prev" title="Regexps">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>


</head>

<body lang="en">
<a name="dbconfig-recipes"></a>
<div class="header">
<p>
Next: <a href="Support.html#Support" accesskey="n" rel="next">Support</a>, Previous: <a href="Regexps.html#Regexps" accesskey="p" rel="prev">Regexps</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="dbconfig-recipes-1"></a>
<h2 class="appendix">Appendix E <samp>dbconfig</samp> recipes</h2>
<a name="index-dbconfig"></a>
<a name="index-dbconfig-recipes"></a>

<p>The <samp>dbconfig</samp> file (<a href="dbconfig-file.html#dbconfig-file">The <samp>dbconfig</samp>
file</a>) is the heart of any <small>GNATS</small> installation.  It contains some
very powerful machinery, something which this appendix tries to
illustrate.
</p>
<p>We provide a range of examples that are both intended to be useful in
their own right and to serve as starting points or building blocks for
your own modifications.
</p>
<a name="Provide-Gnatsweb-URL-in-initial-response"></a>
<h4 class="subsubheading">Provide Gnatsweb URL in initial response</h4>

<p>Sites that have Gnatsweb installed may wish to modify the response
e-mail which is sent to the submitter of a PR so that it includes a
URL where the status of the PR can be monitored.  In order to allow
this, you should first create an entry in <samp>gnatsd.user_access</samp>
which allows viewing of PRs in your database
(See <a href="gnatsd_002euser_005faccess.html#gnatsd_002euser_005faccess">The <samp>gnatsd.user_access</samp> file</a>.)
</p>
<p>Next, locate the entry <code>mail-format
&quot;initial-response-to-submitter&quot;</code> in the <samp>dbconfig</samp> file of your
database and add the following <em>before</em> the line reading &ldquo;The
individual assigned...&rdquo; in the <code>body</code> section:
</p>
<pre class="verbatim">\nYou can follow the status of this report on\n\
http://hostname/cgi-bin/scriptname?\n\
cmd=view&amp;database=dbname&amp;user=username&amp;\n\
password=passwd&amp;pr=%s\n\n\
</pre>
<p>Substitute <code>hostname</code>, <code>cgi-bin</code> and <code>scriptname</code> as
appropriate for the setup of your web server.  The part before the
&lsquo;<samp>?</samp>&rsquo; would typically look something like
<code>http://www.example.com/cgi-bin/gnatsweb.pl</code>.  Substitute the
name of your database for <code>dbname</code>, and the username and password
of the user with <code>view</code> rights for <code>username</code> and
<code>passwd</code>.
</p>
<p>Next, add a <code>Number</code> to the <code>fields</code> list statement inside
the <code>body</code> so it reads as follows:
</p>
<pre class="verbatim">fields { &quot;Category&quot; &quot;Number&quot; &quot;Number&quot; &quot;Responsible&quot;
         &quot;Category&quot; &quot;Responsible&quot; &quot;Synopsis&quot;
         &quot;Arrival-Date&quot; }
</pre>
<a name="State-full-name-of-responsible-in-initial-response"></a>
<h4 class="subsubheading">State full name of responsible in initial response</h4>

<p>The initial e-mail response to the submitter of a PR identifies the
responsible person assigned to the PR as follows: &ldquo;The individual
assigned to look at your report is: <var>GNATS username</var>&rdquo;.  Some
sites may wish to modify this so that the full name of the responsible
person is used instead of the <small>GNATS</small> user name.
</p>
<p>The full name is contained in the <code>fullname</code> subfield of the
user&rsquo;s entry in the <samp>responsible</samp> file and can be accessed as
<code>Responsible[fullname]</code> (see <a href="Field-datatypes.html#administrative-files">Enumerated
field administrative files</a>.)
</p>
<p>The change is achieved by editing the <samp>dbconfig</samp> item
<code>mail-format &quot;initial-response-to-submitter&quot;</code> and changing the
<code>fields</code> part of the <code>Body</code> from
</p>
<pre class="verbatim">fields { &quot;Category&quot; &quot;Number&quot; &quot;Responsible&quot;
         &quot;Category&quot; &quot;Responsible&quot; &quot;Synopsis&quot;
         &quot;Arrival-Date&quot; }
</pre>
<p>to
</p>
<pre class="verbatim">fields { &quot;Category&quot; &quot;Number&quot; &quot;Responsible[fullname]&quot;
         &quot;Category&quot; &quot;Responsible&quot; &quot;Synopsis&quot;
         &quot;Arrival-Date&quot; }
</pre>
<a name="Append_002donly-Audit_002dTrail"></a>
<h4 class="subsubheading">Append-only Audit-Trail</h4>

<p>The Audit-Trail of a PR is by default editable.  For some
applications, one might want to make the Audit-Trail append-only, so
it provides a full and unchangeable case history.  Also by default,
only certain changes, such as change of state and change of
responsible gets recorded in the Audit-Trail.  In some cases, it might
also be convenient to have a way of inserting comments directly into
the Audit-Trail.
</p>
<p>The following procedure creates such an append-only Audit-Trail and
adds a PR field which makes it possible to register comments in the
Audit-Trail.
</p>
<p>First, add the keyword <code>read-only</code> to the Audit-Trail field
definition in <samp>dbconfig</samp>.
</p>
<p>Then, add the following field definition to <samp>dbconfig</samp>:
</p>
<pre class="verbatim">field &quot;Add-To-Audit-Trail&quot; {
   description &quot;Add a log entry to the Audit Trail&quot;
   multitext { default &quot;\n&quot; }
   on-change  {
        add-audit-trail
        audit-trail-format {
        format &quot;**** Comment added by %s on %s ****\n %s\n\n&quot;
        fields { &quot;$EditUserEmailAddr&quot; &quot;$CurrentDate&quot; &quot;$NewValue&quot;
        }
        }
    }
    on-change {
        set-field &quot;Add-To-Audit-Trail&quot; { &quot;\n&quot; }
    }
}
</pre>
<a name="release_002dbased-support"></a><a name="Supporting-GNATS-_0060_0060release_002dbased_0027_0027-fields"></a>
<h4 class="subsubheading">Supporting <small>GNATS</small> &ldquo;release-based&rdquo; fields</h4>

<p>When installing <small>GNATS</small> version 3.x, it was possible to choose
whether to enable three optional fields: <code>Quarter</code>, <code>Keywords</code>
and <code>Date-Required</code>.  Default installations had these fields
switched off, and installations which had them were called
&ldquo;release-based&rdquo;.
</p>
<p>The default <samp>dbconfig</samp> shipped with <small>GNATS</small> version 4 or newer
does not have these fields, so if you are upgrading from an old
release-based system, you need to add the following field definitions to
your <samp>dbconfig</samp> file:
</p>
<pre class="verbatim">field &quot;Quarter&quot; {
    description &quot;What quarter does the PR fall into?&quot;
    text
    query-default inexact-regexp
    textsearch
}

field &quot;Keywords&quot; {
    description &quot;Keywords used to index this PR&quot;
    text
    query-default inexact-regexp
    textsearch
}

field &quot;Date-Required&quot; {
    description &quot;Date that the PR must be fixed by&quot;
    date
}
</pre>
<p>A side note: Pre-release versions of <small>GNATS</small> 4 also had a field
named <code>Cases</code>.  For those who may need it, here is the field
definition of <code>Cases</code>:
</p>
<pre class="verbatim">field &quot;Cases&quot; {
    text
    query-default inexact-regexp
    textsearch
}
</pre>
<hr>
<div class="header">
<p>
Next: <a href="Support.html#Support" accesskey="n" rel="next">Support</a>, Previous: <a href="Regexps.html#Regexps" accesskey="p" rel="prev">Regexps</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>