From c1a8053e98fa659ffda19fae799423c1762dbd10 Mon Sep 17 00:00:00 2001 From: "jocuri%softhome.net" <> Date: Sun, 16 Jan 2005 21:36:02 +0000 Subject: Patch for bug 103636: Support specifying a date on which a bug is expected to be resolved; patch by Alexandre Michetti Manduca , r=jouni, a=myk. --- Bugzilla/BugMail.pm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'Bugzilla/BugMail.pm') diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index 41a8c2329..d9dbb770b 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -184,6 +184,8 @@ sub ProcessOneBug($) { } $values{'estimated_time'} = format_time_decimal($values{'estimated_time'}); + $values{'deadline'} = time2str("%Y-%m-%d", str2time($values{'deadline'})); + my @dependslist; SendSQL("SELECT dependson FROM dependencies WHERE blocked = $id ORDER BY dependson"); @@ -243,6 +245,10 @@ sub ProcessOneBug($) { WHERE attach_id = $attachid"); $diffpart->{'isprivate'} = FetchOneColumn(); } + if( $fieldname eq 'deadline' ) { + $old = time2str("%Y-%m-%d", str2time($old)); + $new = time2str("%Y-%m-%d", str2time($new)); + } $difftext = FormatTriple($what, $old, $new); $diffpart->{'header'} = $diffheader; $diffpart->{'fieldname'} = $fieldname; @@ -741,8 +747,8 @@ sub NewProcessOnePerson ($$$$$$$$$$$$$) { next; } # Only send estimated_time if it is enabled and the user is in the group - if ($f ne 'estimated_time' || - $user->groups->{Param('timetrackinggroup')}) { + if (($f ne 'estimated_time' && $f ne 'deadline') || + $user->groups->{Param('timetrackinggroup')}) { my $desc = $fielddescription{$f}; $head .= FormatDouble($desc, $value); @@ -761,7 +767,8 @@ sub NewProcessOnePerson ($$$$$$$$$$$$$) { if (exists($diff->{'fieldname'}) && ($diff->{'fieldname'} eq 'estimated_time' || $diff->{'fieldname'} eq 'remaining_time' || - $diff->{'fieldname'} eq 'work_time')) { + $diff->{'fieldname'} eq 'work_time' || + $diff->{'fieldname'} eq 'deadline')){ if ($user->groups->{Param("timetrackinggroup")}) { $add_diff = 1; } -- cgit v1.2.3-24-g4f1b