[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patch: Fix to require Reason Changed in Gnatsweb
From: |
Yngve Svendsen |
Subject: |
Patch: Fix to require Reason Changed in Gnatsweb |
Date: |
Sun, 22 Apr 2001 22:49:09 +0200 |
The current Gnatsweb (rev 2.33 plus the patch from Dirk) does not check
that the required Reason Changed fields are filled in when a PR is edited.
The following patch fixes this. It will be committed once things calm down
after the patch from Dirk has been applied.
Dirk: Do you have any ETA on when the copyright paperwork will be finished?
Yngve Svendsen
IS Engineer
Clustra AS, Trondheim, Norway
address@hidden
*** gnatsweb.pl Sun Apr 22 22:40:55 2001
--- gnatsweb_changed.pl Sun Apr 22 22:37:51 2001
***************
*** 1503,1508 ****
--- 1503,1529 ----
}
}
+ # Check whether fields that are specified in dbconfig as requiring a
+ # 'Reason Changed' have the reason specified:
+ foreach my $fieldname (keys %fields)
+ {
+ if ( ($fields{$fieldname} ne $oldfields{$fieldname}) &&
(fieldinfo($fieldname, 'flags') & $REASONCHANGE) )
+ {
+ if($fields{$fieldname."-Changed-Why"} =~ /^\s*$/)
+ {
+ page_heading($page, 'Error');
+ print "<h3>Field '$fieldname' must have a reason for
change</h3>",
+ "<p>Please press the 'Back' button of you browser, correct the
problem and resubmit.</p>\n";
+ last LOCKED;
+ }
+ }
+ if ($fields{$fieldname} eq $oldfields{$fieldname} && exists
$fields{$fieldname."-Changed-Why"} )
+ {
+ delete $fields{$fieldname."-Changed-Why"};
+ }
+ }
+
+
my($newpr) = unparsepr('gnatsd', %fields);
$newpr =~ s/\r//g;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Patch: Fix to require Reason Changed in Gnatsweb,
Yngve Svendsen <=