help-gnats
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

renaming the Originator field


From: Mel Hatzis
Subject: renaming the Originator field
Date: Mon, 06 Oct 2003 15:45:01 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

Please review the following patch which fixes a bug associated with
renaming the Originator field:

Index: file-pr.c
===================================================================
RCS file: /cvs/juniper/sw-tools/src/gnats-dbi-4.1/gnats/file-pr.c,v
retrieving revision 1.7
diff -b -u -p -r1.7 file-pr.c
--- file-pr.c   30 Sep 2003 01:35:49 -0000      1.7
+++ file-pr.c   6 Oct 2003 22:43:34 -0000
@@ -126,7 +126,7 @@ createNewPR (PR *pr, ErrorDesc *err)
   /* If originator wasn't set, try to get the value from the From mail
      header.  This is what users usually expect. */
   {
-    FieldIndex idx_origin = find_field_index (database, "Originator");
+    FieldIndex idx_origin = ORIGINATOR (database);
     const char *value_origin = (idx_origin == InvalidFieldIndex
                                ? NULL
                                : field_value (pr, idx_origin));


If the Originator field is renamed, an attempt to create a new
PR results in gnatsd executing 'abort' inside set_field.

The fix is to use the "builtin" field name rather than the
field's external name.

--
Mel Hatzis





reply via email to

[Prev in Thread] Current Thread [Next in Thread]