summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Flag.pm
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-01-11 21:10:39 +0100
committerDave Lawrence <dlawrence@mozilla.com>2012-01-11 21:10:39 +0100
commit57fa5bafd2a1d68594745c7ea2c854798ad99857 (patch)
tree8839e8b0d735060b547e435cf105534105dc0b84 /Bugzilla/Flag.pm
parenta46fd53966253df66b8a2d448b93eef8c0bf629a (diff)
downloadbugzilla-57fa5bafd2a1d68594745c7ea2c854798ad99857.tar.gz
bugzilla-57fa5bafd2a1d68594745c7ea2c854798ad99857.tar.xz
Bug 714370 - Add accessors to the Flag.pm object for modification_date and creation_date
r=glob
Diffstat (limited to 'Bugzilla/Flag.pm')
-rw-r--r--Bugzilla/Flag.pm13
1 files changed, 13 insertions, 0 deletions
diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm
index a21a907e6..61c06a9f5 100644
--- a/Bugzilla/Flag.pm
+++ b/Bugzilla/Flag.pm
@@ -84,6 +84,8 @@ use constant DB_COLUMNS => qw(
type_id
bug_id
attach_id
+ creation_date
+ modification_date
requestee_id
setter_id
status
@@ -132,6 +134,14 @@ Returns the ID of the attachment this flag belongs to, if any.
Returns the status '+', '-', '?' of the flag.
+=item C<creation_date>
+
+Returns the timestamp when the flag was created.
+
+=item C<modification_date>
+
+Returns the timestamp when the flag was last modified.
+
=back
=cut
@@ -144,6 +154,8 @@ sub attach_id { return $_[0]->{'attach_id'}; }
sub status { return $_[0]->{'status'}; }
sub setter_id { return $_[0]->{'setter_id'}; }
sub requestee_id { return $_[0]->{'requestee_id'}; }
+sub creation_date { return $_[0]->{'creation_date'}; }
+sub modification_date { return $_[0]->{'modification_date'}; }
###############################
#### Methods ####
@@ -450,6 +462,7 @@ sub update {
if (scalar(keys %$changes)) {
$dbh->do('UPDATE flags SET modification_date = ? WHERE id = ?',
undef, ($timestamp, $self->id));
+ $self->{'modification_date'} = $timestamp;
}
return $changes;
}