From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11397 invoked from network); 7 May 2004 03:45:25 -0000 Received: from unknown (HELO monty-python.gnu.org) (199.232.76.173) by sources.redhat.com with SMTP; 7 May 2004 03:45:25 -0000 Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BLwDl-0003lP-9w for listarch-gnats-devel@sources.redhat.com; Thu, 06 May 2004 23:40:21 -0400 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BLwDc-0003k5-HT for help-gnats@gnu.org; Thu, 06 May 2004 23:40:12 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BLwD5-0002ep-TZ for help-gnats@gnu.org; Thu, 06 May 2004 23:40:11 -0400 Received: from [207.17.137.57] (helo=colo-dns-ext1.juniper.net) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.30) id 1BLwB7-0000PU-SB for help-gnats@gnu.org; Thu, 06 May 2004 23:37:37 -0400 Received: from merlot.juniper.net (merlot.juniper.net [172.17.27.10]) by colo-dns-ext1.juniper.net (8.11.3/8.9.3) with ESMTP id i473bZl22624; Thu, 6 May 2004 20:37:35 -0700 (PDT) (envelope-from hatzis@juniper.net) Received: from juniper.net (ssh2.juniper.net [207.17.136.44]) by merlot.juniper.net (8.11.3/8.11.3) with ESMTP id i473bUJ73867; Thu, 6 May 2004 20:37:30 -0700 (PDT) (envelope-from hatzis@juniper.net) Message-ID: <409B0392.8020806@juniper.net> Date: Fri, 07 May 2004 15:20:00 -0000 From: Mel Hatzis User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en MIME-Version: 1.0 To: ray.tran@broadcom.com References: <4098FA9E.6040803@broadcom.com> In-Reply-To: <4098FA9E.6040803@broadcom.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: help-gnats@gnu.org Subject: Re: Required Field Validate on Edit PR X-BeenThere: help-gnats@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: General discussion about GNU GNATS List-Archive: List-Post: List-Help: List-Subscribe: , Sender: help-gnats-bounces+listarch-gnats-devel=sources.redhat.com@gnu.org Errors-To: help-gnats-bounces+listarch-gnats-devel=sources.redhat.com@gnu.org X-SW-Source: 2004-q2/txt/msg00095.txt.bz2 Hi Ray, .... On 05/05/2004 07:30 AM, Ray Tran submitted: > Hello, > > I have the following in my State field > > on-change "State[type]==\"feedback\"" { > require { "Custom_Text" } > } The above clause may be something different to what you're expecting. The "State[type]" specifier is where the confusion may lie, in that it does not denote the value of the State field in the PR but something entirely different. To help explain what State[type] refers to, here's an excerpt from some documentation I've written: | Fields of type enumerated-in-file consist of colon delimited | subfields - these define the format for each line of the file | containing the enum values. Each line of this file can be | thought of as a record with associated attributes. | | The subfields define meta-data attributes of such enum fields. | For example, the 'category' field consists of the following | subfields: | | * category (the primary key) | * fullname (the description | * person (the primary responsible) | * notify (a list of email recipients to notify) | | The first subfield of each value of an enumerated-in-file field | is always the primary key for the field (it defines the set of | valid values for the field). | | The subfield specifier is only valid for enumerated-in-file fields | and is used to refer to a particular subfield value when used as a | suffix to a field name. For example, the query expression | | category[person] == "fred" | | will match all PR's whose value for Category is a member of the set | of category values whose person subfield is equal to "fred". You can get the entire contents of this documenations from: http://professional.juniper.net/gnats/query_internals.html#O_FieldMod To require the Custom_Text field whenever the value of State changes to "feedback", remove the "[type]" specifier from your on-change clause above. > How does Gnatsweb verify that the Custom_Text field is filled in when > the PR is modified? I'm unable to get the validation to work. In other > words, when I change the State to feedback, Gnatsweb does not check to > see if Custom_Text is filled in before the PR is submitted. Thank-you > for your help. Once you've modified the on-change clause as suggested above, attempts to submit a PR without a value for the "Custom_Text" field will generate an error, whenever the State field changes to "feedback"....something along the lines of "Required field Custom_Text missing from PR". [ Note: My answer above is making an assumption that you don't have a State type of "feedback"...if this is not the case, please accept my apologies for the incorrect assumption. ] -- Mel Hatzis _______________________________________________ Help-gnats mailing list Help-gnats@gnu.org http://mail.gnu.org/mailman/listinfo/help-gnats