|
From: Benjamin C. <bc...@us...> - 2002-09-23 20:16:33
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv17058
Modified Files:
bug.php
Log Message:
Update the close_date field when a the closed status is selected.
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -r1.118 -r1.119
--- bug.php 17 Sep 2002 18:14:19 -0000 1.118
+++ bug.php 23 Sep 2002 20:16:30 -0000 1.119
@@ -416,6 +416,11 @@
$os_id = $os_id ? $os_id : 0;
$severity_id = $severity_id ? $severity_id : 0;
+ if ($status_id == BUG_CLOSED) {
+ $closed_query = ", close_date = $now";
+ } else {
+ $closed_query = '';
+ }
$db->query("update ".TBL_BUG." set title = ".$db->quote(stripslashes($title)).
', url = '.$db->quote(stripslashes($url)).", severity_id = $severity_id, ".
"priority = $priority, status_id = $status_id, ".
@@ -425,7 +430,7 @@
"resolution_id = $resolution_id, assigned_to = $assigned_to, ".
"project_id = $project_id, version_id = $version_id, ".
"component_id = $component_id, os_id = $os_id, last_modified_by = $u, ".
- "last_modified_date = $now where bug_id = $bugid");
+ "last_modified_date = $now $closed_query where bug_id = $bugid");
if (count($changedfields) or !empty($comments)) {
do_changedfields($u, $buginfo, $changedfields, $comments);
|