diff options
Diffstat (limited to 'extensions/BMO')
6 files changed, 41 insertions, 15 deletions
diff --git a/extensions/BMO/lib/Reports.pm b/extensions/BMO/lib/Reports.pm index a06d796b5..9e07c40e7 100644 --- a/extensions/BMO/lib/Reports.pm +++ b/extensions/BMO/lib/Reports.pm @@ -201,6 +201,13 @@ sub user_activity_report { my $list = $dbh->selectall_arrayref($query, undef, @params); + if ($input->{debug}) { + while (my $param = shift @params) { + $query =~ s/\?/$dbh->quote($param)/e; + } + $vars->{debug_sql} = $query; + } + my @operations; my $operation = {}; my $changes = []; @@ -245,7 +252,11 @@ sub user_activity_report { if ($order eq 'bug_when') { $is_new_changeset = $operation->{'who'} && - ($who ne $operation->{'who'} || $when ne $operation->{'when'}); + ( + $who ne $operation->{'who'} + || $when ne $operation->{'when'} + || $bugid != $operation->{'bug'} + ); } else { $is_new_changeset = $operation->{'bug'} && @@ -895,7 +906,7 @@ sub release_tracking_report { # run report # - if ($input->{q}) { + if ($input->{q} && !$input->{edit}) { my $q = _parse_query($input->{q}); my @where; @@ -921,7 +932,7 @@ sub release_tracking_report { push @params, $q->{end_date} . ' 00:00:00'; push @where, "(a.added LIKE ?)"; - push @params, '%' . $q->{flag_name} . '?%'; + push @params, '%' . $q->{flag_name} . $q->{flag_status} . '%'; } push @where, "(f.type_id IN (SELECT id FROM flagtypes WHERE name = ?))"; @@ -950,6 +961,16 @@ sub release_tracking_report { $query .= join("\nAND ", @where); + if ($input->{debug}) { + print "Content-Type: text/plain\n\n"; + $query =~ s/\?/\000/g; + foreach my $param (@params) { + $query =~ s/\000/$param/; + } + print "$query\n"; + exit; + } + my $bugs = $dbh->selectcol_arrayref($query, undef, @params); push @$bugs, 0 unless @$bugs; diff --git a/extensions/BMO/template/en/default/bug/create/create-brownbag.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-brownbag.html.tmpl index d0693051c..e1886190c 100644 --- a/extensions/BMO/template/en/default/bug/create/create-brownbag.html.tmpl +++ b/extensions/BMO/template/en/default/bug/create/create-brownbag.html.tmpl @@ -175,7 +175,7 @@ function trySubmit() { <option value="UTC+11">UTC+11</option> <option value="UTC+12">UTC+11</option> </select> - </td> + </td> </tr> <tr> diff --git a/extensions/BMO/template/en/default/bug/create/create-itrequest.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-itrequest.html.tmpl index 637eae57a..6944b74f7 100644 --- a/extensions/BMO/template/en/default/bug/create/create-itrequest.html.tmpl +++ b/extensions/BMO/template/en/default/bug/create/create-itrequest.html.tmpl @@ -173,7 +173,7 @@ </table> <br> - <!-- infra [% terms.bugs %] --> + <!-- infra --> <input type="checkbox" name="groups" id="groups" value="infra" checked="checked"><label for="groups"><strong>This is an internal issue which should not be publicly visible.</strong></label><br>(please uncheck this box if it isn't) <br><br> diff --git a/extensions/BMO/template/en/default/bug/create/create-mozlist.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-mozlist.html.tmpl index 39a372351..66bb4367d 100644 --- a/extensions/BMO/template/en/default/bug/create/create-mozlist.html.tmpl +++ b/extensions/BMO/template/en/default/bug/create/create-mozlist.html.tmpl @@ -287,7 +287,7 @@ <br> <div id="groups" style="display:none;"> - <!-- infra [% terms.bugs %] --> + <!-- infra --> <input type="checkbox" name="groups" id="group_35" value="infra" disabled="true"> <label for="group_35"><strong>This is an internal issue which should not be publicly visible.</strong></label> <br><br> diff --git a/extensions/BMO/template/en/default/hook/bug/edit-after_custom_fields.html.tmpl b/extensions/BMO/template/en/default/hook/bug/edit-after_custom_fields.html.tmpl index 4be267b79..de97706b0 100644 --- a/extensions/BMO/template/en/default/hook/bug/edit-after_custom_fields.html.tmpl +++ b/extensions/BMO/template/en/default/hook/bug/edit-after_custom_fields.html.tmpl @@ -70,17 +70,15 @@ [% IF tracking_flags.size %] <tr> - <td class="" colspan="2"> - <label><b>Tracking Flags:</b></label> + <th class="field_label"> + <label>Tracking Flags:</label> + </td> + <td> [% IF user.id %] - <span id="edit_tracking_fields_action"> - (<a onclick="bmo_show_tracking_flags()" href="javascript:void(0)">edit</a>) - </span> + <span id="edit_tracking_fields_action"> + (<a onclick="bmo_show_tracking_flags()" href="javascript:void(0)">edit</a>) + </span> [% END %] - </td> - </tr> - <tr> - <td colspan="2"> <table id="custom-flags"> [% FOREACH field = tracking_flags %] [% NEXT IF NOT user.id AND field.value == "---" %] diff --git a/extensions/BMO/template/en/default/pages/user_activity.html.tmpl b/extensions/BMO/template/en/default/pages/user_activity.html.tmpl index 3e6695484..377d7c244 100644 --- a/extensions/BMO/template/en/default/pages/user_activity.html.tmpl +++ b/extensions/BMO/template/en/default/pages/user_activity.html.tmpl @@ -78,6 +78,9 @@ </tr> </table> +[% IF debug_sql %] + <input type="hidden" name="debug" value="1"> +[% END %] </form> <script type="text/javascript"> @@ -87,6 +90,10 @@ [% IF action == 'run' %] +[% IF debug_sql %] + <pre>[% debug_sql FILTER html %]</pre> +[% END %] + [% IF incomplete_data %] <p> There used to be an issue in <a href="http://www.bugzilla.org/">Bugzilla</a> |