summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'extensions')
-rw-r--r--extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl1
-rw-r--r--extensions/Review/Extension.pm4
-rw-r--r--extensions/TrackingFlags/lib/Admin.pm13
-rw-r--r--extensions/TrackingFlags/lib/Flag/Bug.pm16
-rw-r--r--extensions/TryAutoLand/Extension.pm2
5 files changed, 30 insertions, 6 deletions
diff --git a/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl b/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl
index 87dea003c..de1191520 100644
--- a/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl
+++ b/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl
@@ -137,7 +137,6 @@
<option value="qa_contact">qa contact</option>
[% END %]
<option value="user">myself</option>
- <option value="">anyone</option>
</select>
<span id="needinfo_from_container">
[% INCLUDE global/userselect.html.tmpl
diff --git a/extensions/Review/Extension.pm b/extensions/Review/Extension.pm
index 16429ccdd..3f3383697 100644
--- a/extensions/Review/Extension.pm
+++ b/extensions/Review/Extension.pm
@@ -380,7 +380,7 @@ sub _check_review_flag {
# extract the set flag-types
my @flagtype_ids = map { /^flag_type-(\d+)$/ ? $1 : () } $cgi->param();
- @flagtype_ids = grep { $cgi->param("flag_type-$_") ne 'X' } @flagtype_ids;
+ @flagtype_ids = grep { $cgi->param("flag_type-$_") eq '?' } @flagtype_ids;
return unless scalar(@flagtype_ids);
# find valid review flagtypes
@@ -656,7 +656,7 @@ sub db_schema_abstract_schema {
},
attachment_id => {
- TYPE => 'INT5',
+ TYPE => 'INT3',
REFERENCES => {
TABLE => 'attachments',
COLUMN => 'attach_id',
diff --git a/extensions/TrackingFlags/lib/Admin.pm b/extensions/TrackingFlags/lib/Admin.pm
index ef7672eaa..b72416819 100644
--- a/extensions/TrackingFlags/lib/Admin.pm
+++ b/extensions/TrackingFlags/lib/Admin.pm
@@ -19,6 +19,7 @@ use Bugzilla::Util qw(trim detaint_natural);
use Bugzilla::Extension::TrackingFlags::Constants;
use Bugzilla::Extension::TrackingFlags::Flag;
+use Bugzilla::Extension::TrackingFlags::Flag::Bug;
use Bugzilla::Extension::TrackingFlags::Flag::Value;
use Bugzilla::Extension::TrackingFlags::Flag::Visibility;
@@ -338,8 +339,16 @@ sub _update_db_values {
if ($value->{id}) {
my $value_obj = Bugzilla::Extension::TrackingFlags::Flag::Value->new($value->{id})
|| ThrowCodeError('tracking_flags_invalid_item_id', { item => 'flag value', id => $flag->{id} });
- $value_obj->set_all($object_set);
- $value_obj->update();
+ my $old_value = $value_obj->value;
+ if ($object_set->{value} ne $old_value) {
+ $value_obj->set_all($object_set);
+ $value_obj->update();
+ Bugzilla::Extension::TrackingFlags::Flag::Bug->update_all_values({
+ value_obj => $value_obj,
+ old_value => $old_value,
+ new_value => $value_obj->value,
+ });
+ }
} else {
$object_set->{tracking_flag_id} = $flag_obj->flag_id;
Bugzilla::Extension::TrackingFlags::Flag::Value->create($object_set);
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 ####
###############################
diff --git a/extensions/TryAutoLand/Extension.pm b/extensions/TryAutoLand/Extension.pm
index 8aaadff95..40dbb70d9 100644
--- a/extensions/TryAutoLand/Extension.pm
+++ b/extensions/TryAutoLand/Extension.pm
@@ -61,7 +61,7 @@ sub db_schema_abstract_schema {
$args->{'schema'}->{'autoland_attachments'} = {
FIELDS => [
attach_id => {
- TYPE => 'INT5',
+ TYPE => 'INT3',
NOTNULL => 1,
PRIMARYKEY => 1,
REFERENCES => {