From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26759 invoked from network); 16 Mar 2003 20:03:28 -0000 Received: from unknown (HELO monty-python.gnu.org) (199.232.76.173) by sources.redhat.com with SMTP; 16 Mar 2003 20:03:28 -0000 Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18ueLh-0006Ne-02 for listarch-gnats-devel@sources.redhat.com; Sun, 16 Mar 2003 15:03:13 -0500 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18ueLV-0006Ks-00 for help-gnats@gnu.org; Sun, 16 Mar 2003 15:03:01 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18ueLS-0006Dp-00 for help-gnats@gnu.org; Sun, 16 Mar 2003 15:03:00 -0500 Received: from natint.juniper.net ([207.17.136.129] helo=merlot.juniper.net) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18ueLS-0006Bz-00 for help-gnats@gnu.org; Sun, 16 Mar 2003 15:02:58 -0500 Received: from juniper.net (ssh.juniper.net [207.17.136.39]) by merlot.juniper.net (8.11.3/8.11.3) with ESMTP id h2GK2oS85534; Sun, 16 Mar 2003 12:02:51 -0800 (PST) (envelope-from hatzis@juniper.net) Message-ID: <3E74D890.5030504@juniper.net> Date: Sun, 16 Mar 2003 20:03:00 -0000 From: Mel Hatzis User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Lars Henriksen References: <3E6AC502.409@juniper.net> <20030316174755.GA291290@teapot.netman.dk> In-Reply-To: <20030316174755.GA291290@teapot.netman.dk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: "'help-gnats@gnu.org'" cc: Yngve Svendsen Subject: Re: patch for missing 'chek' prior to edit X-BeenThere: help-gnats@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: General discussion about GNU GNATS List-Help: List-Post: List-Subscribe: , List-Archive: 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: 2003-q1/txt/msg00095.txt.bz2 On 03/16/2003 09:47 AM, Lars Henriksen submitted: >On Sat, Mar 08, 2003 at 08:37:22PM -0800, Mel Hatzis wrote: > > >>Please review the following patch which fixes a bug whereby >>a 'chek' is not performed when submitting an edited PR. >> >> > >The check is done by gnatsd itself as part of the EDIT command. > > You're right....I overlooked this entirely after reviewing the gnatsweb code and noticing the inconsistency between the 'create' and the 'edit'. > > >>I noticed that 'chek initial' is done for submitnewpr >> >> > >Yes, I filed this fix with PR 386 some time back: > > >This was the easiest way out, but maybe the proper way is to correct >the submit_pr() function to perform the check for the SUBM command >as done by replace_pr() for the EDIT command. > Agreed. > > > >> but >>there's no 'chek' for submitedit. This means that field >>validation based on the the field definitions in the dbconfig >>is not performed for PR edits. >> >> > >Did you try? At least validation works for text fields with matching >regexps. > > Apologies for the oversight....it all seems to be working as coded. -- Mel Hatzis > > >>Here's the patch... >> >>Index: gnatsweb.pl >>=================================================================== >>RCS file: /cvsroot/gnatsweb/gnatsweb/gnatsweb.pl,v >>retrieving revision 1.120 >>diff -u -p -r1.120 gnatsweb.pl >>--- gnatsweb.pl 8 Jan 2003 13:04:17 -0000 1.120 >>+++ gnatsweb.pl 9 Mar 2003 04:37:01 -0000 >>@@ -1808,6 +1808,10 @@ sub submitedit >> >> # Submit the edits. We need to unlock the PR even if the edit fails >> local($suppress_client_exit) = 1; >>+ client_cmd("chek"); >>+ last LOCKED if ($client_would_have_exited); >>+ client_cmd("$newpr\n."); >>+ last LOCKED if ($client_would_have_exited); >> client_cmd("editaddr $db_prefs{'user'}"); >> last LOCKED if ($client_would_have_exited); >> client_cmd("edit $pr"); >> >> > >Lars Henriksen > > _______________________________________________ Help-gnats mailing list Help-gnats@gnu.org http://mail.gnu.org/mailman/listinfo/help-gnats