[Top][All Lists]

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

Re: Required Field Validate on Edit PR

From: Mel Hatzis
Subject: Re: Required Field Validate on Edit PR
Date: Thu, 06 May 2004 20:33:38 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113

Hi Ray, ....

On 05/05/2004 07:30 AM, Ray Tran submitted:

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:

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

reply via email to

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