public inbox for gnats-devel@sourceware.org
 help / color / mirror / Atom feed
From: Mel Hatzis <hatzis@juniper.net>
To: ray.tran@broadcom.com
Cc: help-gnats@gnu.org
Subject: Re: Required Field Validate on Edit PR
Date: Fri, 07 May 2004 15:20:00 -0000	[thread overview]
Message-ID: <409B0392.8020806@juniper.net> (raw)
In-Reply-To: <4098FA9E.6040803@broadcom.com>

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

      reply	other threads:[~2004-05-07  3:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-06  9:07 Ray Tran
2004-05-07 15:20 ` Mel Hatzis [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=409B0392.8020806@juniper.net \
    --to=hatzis@juniper.net \
    --cc=help-gnats@gnu.org \
    --cc=ray.tran@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).