summaryrefslogtreecommitdiffstats
path: root/extensions/TrackingFlags/lib/Flag
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2014-04-08 06:02:51 +0200
committerByron Jones <glob@mozilla.com>2014-04-08 06:02:51 +0200
commit92c46e3d89e4532c02bad1ba8308637a57cae645 (patch)
tree91ae0f27b68972de4ebbb63e5e70ef98caa4dc6e /extensions/TrackingFlags/lib/Flag
parent13408dc745948de52f0dc6f1a3e7080a39289ab4 (diff)
downloadbugzilla-92c46e3d89e4532c02bad1ba8308637a57cae645.tar.gz
bugzilla-92c46e3d89e4532c02bad1ba8308637a57cae645.tar.xz
Bug 991477: changing a tracking flag's value doesn't result in the value being updated on bugs
Diffstat (limited to 'extensions/TrackingFlags/lib/Flag')
-rw-r--r--extensions/TrackingFlags/lib/Flag/Bug.pm16
1 files changed, 16 insertions, 0 deletions
diff --git a/extensions/TrackingFlags/lib/Flag/Bug.pm b/extensions/TrackingFlags/lib/Flag/Bug.pm
index 5e2886e66..ea382a29d 100644
--- a/extensions/TrackingFlags/lib/Flag/Bug.pm
+++ b/extensions/TrackingFlags/lib/Flag/Bug.pm
@@ -122,6 +122,22 @@ sub preload_all_the_things {
}
}
+##############################
+#### Class Methods ####
+##############################
+
+sub update_all_values {
+ my ($invocant, $params) = @_;
+ my $dbh = Bugzilla->dbh;
+ $dbh->do(
+ "UPDATE tracking_flags_bugs SET value=? WHERE tracking_flag_id=? AND value=?",
+ undef,
+ $params->{new_value},
+ $params->{value_obj}->tracking_flag_id,
+ $params->{old_value},
+ );
+}
+
###############################
#### Validators ####
###############################