From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9167 invoked from network); 19 Feb 2005 05:16:34 -0000 Received: from unknown (HELO lists.gnu.org) (199.232.76.165) by sourceware.org with SMTP; 19 Feb 2005 05:16:34 -0000 Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D2NCK-00085S-HJ for listarch-gnats-devel@sources.redhat.com; Sat, 19 Feb 2005 00:30:32 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D2N70-00060m-I5 for help-gnats@gnu.org; Sat, 19 Feb 2005 00:25:05 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D2N6o-0005v9-LN for help-gnats@gnu.org; Sat, 19 Feb 2005 00:24:51 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D2N6n-0005qw-9M for help-gnats@gnu.org; Sat, 19 Feb 2005 00:24:49 -0500 Received: from [216.27.182.174] (helo=wattes.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1D2MgU-0002oI-CL for help-gnats@gnu.org; Fri, 18 Feb 2005 23:57:38 -0500 Received: from [10.64.209.22] ([10.64.209.22]) by wattes.org (8.11.6/8.11.6) with ESMTP id j1J4vTc22787; Fri, 18 Feb 2005 20:57:29 -0800 Message-ID: <4216C73D.5000704@wattes.org> Date: Sat, 19 Feb 2005 05:16:00 -0000 From: Mel Hatzis User-Agent: Mozilla Thunderbird 1.0 (Macintosh/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "McFarland, Ken" References: <8A16DAD84432534FBFC19FD92B50512F0268BBDE@ames.starentnetworks.com> In-Reply-To: <8A16DAD84432534FBFC19FD92B50512F0268BBDE@ames.starentnetworks.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Jim Prowak , help-gnats@gnu.org Subject: Re: restricting close PR X-BeenThere: help-gnats@gnu.org X-Mailman-Version: 2.1.5 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: 2005-q1/txt/msg00033.txt.bz2 McFarland, Ken wrote: > Jim, > > Without making perl change in gnatsweb.pl I don't think thing there is > support for this today. However, you could do something like this in your > dbconfig file. It's not pretty, but would probably work....but you'll > need to keep an updated list of people not allowed to close a PR in > here (not > a great solution) I don't to this exactly, but do change other fields > based on certain state changes. I didn't try this, but tweaked mine a > bit for > this example.... I think this would work for you to block say user > kmcfarla from closing a PR. > > fwiw > > field "State" { > builtin-name "state" > description "The current state of the PR" > enumerated-in-file { > path "states" > fields { "state" "type" "description" } > key "state" > default "open" > } > textsearch > > on-change { > # Add Audit-Trail entries when this field changes. > add-audit-trail > # Require that a reason be supplied when this field is edited. > require-change-reason > } > > > # > # Change State back to its original setting for the following users > aren't allowed to Close a PR > # > on-change "(oldpr:State[type]==\"open\") & (Originator==\"kmcfarla\")" { > > set-field "State" { > oldpr:State > } > } > } Actually, a better way to do this would be to extend the set of metadata fields in the responsible file with an additional datapoint...call it the 'allowed-to-close' field. So your responsible file would look something like: gnats-admin:GNATS administrator:foo@bar.org:N foo:Foo User:foo@bar.org:N bar:Bar User:bar@bar.org:Y baz:Baz User:baz@bar.org:N etc. You'll need to tweak your dbconfig file and update the definition of the 'Responsible' field along these lines too. Once you've done this, you can use the following type of on-change clause: on-change "(oldpr:state[type]==\"open\") &\ (state[type]==\"closed\") &\ (responsible[allowed-to-close]==\"N\")" { set-field "State" { "%s" "$OldValue" } } Note that I haven't tested this, but it ought to work. Let me know if you have trouble with it. -- Mel Hatzis > > -----Original Message----- > *From:* help-gnats-bounces+kmcfarland=starentnetworks.com@gnu.org > [mailto:help-gnats-bounces+kmcfarland=starentnetworks.com@gnu.org]*On > Behalf Of *Jim Prowak > *Sent:* Wednesday, February 16, 2005 9:17 AM > *To:* help-gnats@gnu.org > *Subject:* restricting close PR > > > With gnats-web, is there a way to restrict the ability to close PRs > to a certain user? > > thanks, > > Jim > -------------------------------------------------------------------------------------------- > Jim Prowak > Voice(585) 899-4306 > National Semiconductor Fax > (585) 899-4320 > 1000 Pittsford-Victor Rd. > Pittsford, N.Y. 14534 > jim.prowak@nsc.com > -------------------------------------------------------------------------------------------- > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Help-gnats mailing list > Help-gnats@gnu.org > http://lists.gnu.org/mailman/listinfo/help-gnats _______________________________________________ Help-gnats mailing list Help-gnats@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnats