[bugzilla-gnome-org-extensions] initial import
- From: Krzesimir Nowak <krnowak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bugzilla-gnome-org-extensions] initial import
- Date: Thu, 20 Nov 2014 22:09:52 +0000 (UTC)
commit c9768f7289c163caaae0a92334f53a0a7f24ebcd
Author: Olav Vitters <olav vitters nl>
Date: Wed Feb 29 10:43:56 2012 +0100
initial import
Config.pm | 33 +++
Extension.pm | 287 ++++++++++++++++++++
README | 6 +
lib/Params.pm | 54 ++++
lib/Util.pm | 34 +++
lib/WebService.pm | 89 ++++++
template/en/default/admin/params/gnome.html.tmpl | 31 ++
template/en/default/gnome/README | 16 +
template/en/default/hook/README | 5 +
.../classifications/edit-common-rows.html.tmpl | 12 +
.../classifications/updated-changes.html.tmpl | 10 +
.../createformcontents-mimetypes.html.tmpl | 2 +
.../en/default/hook/global/variables-end.none.tmpl | 21 ++
template/en/default/pages/403.html.tmpl | 11 +
template/en/default/pages/email.html.tmpl | 124 +++++++++
template/en/default/pages/points.html.tmpl | 78 ++++++
template/en/default/pages/reports.html.tmpl | 180 ++++++++++++
test.py | 16 +
web/README | 7 +
19 files changed, 1016 insertions(+), 0 deletions(-)
---
diff --git a/Config.pm b/Config.pm
new file mode 100644
index 0000000..3b273ff
--- /dev/null
+++ b/Config.pm
@@ -0,0 +1,33 @@
+# -*- Mode: perl; indent-tabs-mode: nil -*-
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code is the GNOME Bugzilla Extension.
+#
+# The Initial Developer of the Original Code is Olav Vitters
+# Portions created by the Initial Developer are Copyright (C) 2011 the
+# Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# Olav Vitters <olav vitters nl>
+
+package Bugzilla::Extension::GNOME;
+use strict;
+
+use constant NAME => 'GNOME';
+
+use constant REQUIRED_MODULES => [
+];
+
+use constant OPTIONAL_MODULES => [
+];
+
+__PACKAGE__->NAME;
diff --git a/Extension.pm b/Extension.pm
new file mode 100644
index 0000000..1aedae5
--- /dev/null
+++ b/Extension.pm
@@ -0,0 +1,287 @@
+# -*- Mode: perl; indent-tabs-mode: nil -*-
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code is the GNOME Bugzilla Extension.
+#
+# The Initial Developer of the Original Code is Olav Vitters
+# Portions created by the Initial Developer are Copyright (C) 2011 the
+# Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# Olav Vitters <olav vitters nl>
+
+package Bugzilla::Extension::GNOME;
+use strict;
+use base qw(Bugzilla::Extension);
+
+# This code for this is in ./extensions/GNOME/lib/Util.pm
+use Bugzilla::Extension::GNOME::Util;
+use Bugzilla::Constants;
+use Bugzilla::Field;
+use Bugzilla::Object;
+
+our $VERSION = '0.01';
+
+# See the documentation of Bugzilla::Hook ("perldoc Bugzilla::Hook"
+# in the bugzilla directory) for a list of all available hooks.
+sub install_update_db {
+ my ($self, $args) = @_;
+
+ my $dbh = Bugzilla->dbh;
+
+ # We have GNOME and non-GNOME products. They're controlled via a is_gnome field
+ # on a classification level
+ #
+ # This extension triggers various updates based on the is_gnome checkbox changing
+ if (!$dbh->bz_column_info('classifications', 'is_gnome')) {
+ $dbh->bz_add_column('classifications', 'is_gnome',
+ {TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 'FALSE'});
+
+ $dbh->do("UPDATE classifications
+ SET is_gnome = 1
+ WHERE name IN ('Core', 'Platform', 'Bindings', 'Applications')");
+ }
+
+ # Don't want Platform in GNOME Bugzilla
+ my $platform = new Bugzilla::Field({'name' => 'rep_platform'});
+ if (!$platform->obsolete || $platform->in_new_bugmail) {
+
+ $platform->set_obsolete(1);
+ $platform->set_in_new_bugmail(0);
+ $platform->update();
+ }
+}
+
+sub install_before_final_checks {
+ my ($self, $args) = @_;
+
+ # 2009-05-06 bbaetz everythingsolved com - add GNOME version and GNOME target fields
+ my $classification_id = get_field_id("classification");
+
+ my $gnome_version = new Bugzilla::Field({'name' => 'cf_gnome_version'});
+ if (!$gnome_version) {
+ $gnome_version = Bugzilla::Field->create({
+ name => 'cf_gnome_version',
+ description => 'GNOME version',
+ type => FIELD_TYPE_SINGLE_SELECT,
+ sortkey => 200,
+ mailhead => 1,
+ enter_bug => 1,
+ obsolete => 0,
+ custom => 1,
+ visibility_field_id => $classification_id,
+ visibility_values => [ 1 ], # Corrected later
+ });
+ }
+
+ my $gnome_target = new Bugzilla::Field({'name' => 'cf_gnome_target'});
+ if (!$gnome_target) {
+ $gnome_target = Bugzilla::Field->create({
+ name => 'cf_gnome_target',
+ description => 'GNOME target',
+ type => FIELD_TYPE_SINGLE_SELECT,
+ sortkey => 210,
+ mailhead => 1,
+ enter_bug => 1,
+ obsolete => 0,
+ custom => 1,
+ visibility_field_id => $classification_id,
+ visibility_values => [ 1 ], # Corrected later
+ });
+ }
+ # Correct visibility_values
+ _update_gnome_cf_visibility_values() if ($gnome_version || $gnome_target);
+}
+
+
+sub config_add_panels {
+ my ($self, $args) = @_;
+ my $modules = $args->{'panel_modules'};
+ $modules->{'GNOME'} = 'Bugzilla::Extension::GNOME::Params';
+}
+
+sub config_modify_panels {
+ my ($self, $args) = @_;
+
+ my $panels = $args->{panels};
+
+ # Change some defaults to match GNOME requirements
+ my $query_params = $panels->{'query'}->{params};
+
+ my ($search_allow_no_criteria) = grep($_->{name} eq 'search_allow_no_criteria', @$query_params);
+ $search_allow_no_criteria->{default} = 0;
+}
+
+sub object_columns {
+ my ($self, $args) = @_;
+ my ($class, $columns) = @$args{qw(class columns)};
+ if ($class->isa('Bugzilla::Classification')) {
+ push(@$columns, qw(is_gnome));
+ }
+}
+
+sub object_update_columns {
+ my ($self, $args) = @_;
+ my ($object, $columns) = @$args{qw(object columns)};
+ if ($object->isa('Bugzilla::Classification')) {
+ push(@$columns, qw(is_gnome));
+ # XXX - ugly workaround; editclassifications.cgi doesn't use set_all() :-(
+ my $input = Bugzilla->input_params;
+ $object->set('is_gnome', scalar($input->{'is_gnome'}) ? '1' : '0');
+ }
+}
+
+sub object_validators {
+ my ($self, $args) = @_;
+ my ($class, $validators) = @$args{qw(class validators)};
+ if ($class->isa('Bugzilla::Classification')) {
+ $validators->{'is_gnome'} = \&Bugzilla::Object::check_boolean;
+ }
+}
+
+sub object_before_create {
+ my ($self, $args) = @_;
+ my ($class, $params) = @$args{qw(class params)};
+ if ($class->isa('Bugzilla::Classification')) {
+ my $input = Bugzilla->input_params;
+ $params->{is_gnome} = scalar($input->{'is_gnome'}) ? '1' : '0';
+ }
+}
+
+sub object_end_of_create {
+ my ($self, $args) = @_;
+
+ my $class = $args->{'class'};
+
+ # Ensure GNOME version and GNOME target fields are visible for the GNOME
+ # classifications
+ if ($class->isa('Bugzilla::Classification')) {
+ _update_gnome_cf_visibility_values();
+ }
+}
+
+sub object_end_of_update {
+ my ($self, $args) = @_;
+
+ my ($object, $old_object, $changes) =
+ @$args{qw(object old_object changes)};
+
+ # Ensure GNOME version and GNOME target fields are visible for the GNOME
+ # classifications
+ if ($object->isa('Bugzilla::Classification')) {
+ if (defined $changes->{'is_gnome'}) {
+ _update_gnome_cf_visibility_values();
+ }
+ }
+}
+
+sub _update_gnome_cf_visibility_values {
+
+ my $dbh = Bugzilla->dbh;
+
+ my $gnome_version = new Bugzilla::Field({'name' => 'cf_gnome_version'});
+ my $gnome_target = new Bugzilla::Field({'name' => 'cf_gnome_target'});
+
+ # Paranoia; these should have been added by checksetup.pl
+ return unless $gnome_version || $gnome_target;
+
+ my $classification_ids = $dbh->selectcol_arrayref('SELECT id FROM classifications WHERE is_gnome = 1');
+ # In case none of the classifications are is_gnome, just pick #1 (unclassified)
+ push @{$classification_ids}, 1 unless scalar @$classification_ids;
+
+ if ($gnome_version) {
+ $gnome_version->set_visibility_values( $classification_ids );
+ $gnome_version->update();
+ }
+
+ if ($gnome_target) {
+ $gnome_target->set_visibility_values( $classification_ids );
+ $gnome_target->update();
+ }
+}
+
+sub object_end_of_set_all {
+ # XXX currently not used; Bugzilla 5.0 will have it
+ my ($self, $args) = @_;
+ my ($object) = $args->{object};
+ if ($object->isa('Bugzilla::Classification')) {
+ my $input = Bugzilla->input_params;
+ $object->set('is_gnome', scalar($input->{'is_gnome'}) ? '1' : '0');
+ }
+}
+
+sub bug_check_can_change_field {
+ my ($self, $args) = @_;
+
+ my ($bug, $field, $new_value, $old_value, $priv_results)
+ = @$args{qw(bug field new_value old_value priv_results)};
+
+ my $user = Bugzilla->user;
+
+ # Allow anyone to change the keywords
+ if ($field eq 'keywords')
+ {
+ push(@$priv_results, PRIVILEGES_REQUIRED_NONE);
+ return;
+ }
+
+ # Require loads of priviledges to change the GNOME target field
+ if ($field eq 'cf_gnome_target' && !$user->in_group('editclassifications'))
+ {
+ push(@$priv_results, PRIVILEGES_REQUIRED_EMPOWERED);
+ return;
+ }
+
+ # Allow reporter to 'clear' the NEEDINFO status
+ if ($field eq 'bug_status' && $user->login eq $bug->reporter->login) {
+ if ($old_value eq 'NEEDINFO' && $new_value eq 'UNCONFIRMED')
+ {
+ push(@$priv_results, PRIVILEGES_REQUIRED_NONE);
+ return;
+ }
+ }
+
+# # Disallow a bug's keywords from being edited unless user is the
+# # reporter of the bug·
+# if ($field eq 'keywords' && $bug->product_obj->name eq 'Example'
+# && $user->login ne $bug->reporter->login)
+# {
+# push(@$priv_results, PRIVILEGES_REQUIRED_REPORTER);
+# return;
+# }
+}
+
+sub bugmail_recipients {
+ my ($self, $args) = @_;
+ my $recipients = $args->{recipients};
+ my $users = $args->{users};
+ my $bug = $args->{bug};
+
+ # Don't email to @gnome.bugs and related
+
+ foreach my $user_id (keys %recipients) {
+ $users{$user_id} ||= new Bugzilla::User($user_id);
+ my $user = $users{$user_id};
+
+ delete $recipients{$user_id} if $user->email =~ /\.bugs$/;
+ }
+}
+
+
+sub webservice {
+ my ($self, $args) = @_;
+
+ my $dispatch = $args->{dispatch};
+ $dispatch->{GNOME} = "Bugzilla::Extension::GNOME::WebService";
+}
+
+__PACKAGE__->NAME;
diff --git a/README b/README
new file mode 100644
index 0000000..cddc3eb
--- /dev/null
+++ b/README
@@ -0,0 +1,6 @@
+
+This extensions implements everything related to GNOME Bugzilla.
+
+Recommend not to use this extension anywhere else. The functionality is really
+specific.
+
diff --git a/lib/Params.pm b/lib/Params.pm
new file mode 100644
index 0000000..a672215
--- /dev/null
+++ b/lib/Params.pm
@@ -0,0 +1,54 @@
+# -*- Mode: perl; indent-tabs-mode: nil -*-
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code is the Bugzilla Bug Tracking System.
+#
+# The Initial Developer of the Original Code is Netscape Communications
+# Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All
+# Rights Reserved.
+#
+# Contributor(s): Terry Weissman <terry mozilla org>
+# Dawn Endico <endico mozilla org>
+# Dan Mosedale <dmose mozilla org>
+# Joe Robins <jmrobins tgix com>
+# Jacob Steenhagen <jake bugzilla org>
+# J. Paul Reed <preed sigkill com>
+# Bradley Baetz <bbaetz student usyd edu au>
+# Joseph Heenan <joseph heenan me uk>
+# Erik Stambaugh <erik dasbistro com>
+# Frédéric Buclin <LpSolit gmail com>
+#
+
+package Bugzilla::Extension::GNOME::Params;
+
+use strict;
+
+use Bugzilla::Config::Common;
+
+our $sortkey = 2000;
+
+sub get_param_list {
+ my ($class) = @_;
+
+ my @param_list = (
+ {
+ name => 'allowed-hosts',
+ type => 'l',
+ default => '209.132.180.167
+209.132.180.178'
+ },
+ );
+ return @param_list;
+};
+
+1;
diff --git a/lib/Util.pm b/lib/Util.pm
new file mode 100644
index 0000000..d83114c
--- /dev/null
+++ b/lib/Util.pm
@@ -0,0 +1,34 @@
+# -*- Mode: perl; indent-tabs-mode: nil -*-
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code is the GNOME Bugzilla Extension.
+#
+# The Initial Developer of the Original Code is YOUR NAME
+# Portions created by the Initial Developer are Copyright (C) 2011 the
+# Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# YOUR NAME <YOUR EMAIL ADDRESS>
+
+package Bugzilla::Extension::GNOME::Util;
+use strict;
+use base qw(Exporter);
+our @EXPORT = qw(
+
+);
+
+# This file can be loaded by your extension via
+# "use Bugzilla::Extension::GNOME::Util". You can put functions
+# used by your extension in here. (Make sure you also list them in
+# @EXPORT.)
+
+1;
\ No newline at end of file
diff --git a/lib/WebService.pm b/lib/WebService.pm
new file mode 100644
index 0000000..b141431
--- /dev/null
+++ b/lib/WebService.pm
@@ -0,0 +1,89 @@
+# -*- Mode: perl; indent-tabs-mode: nil -*-
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code is the Bugzilla Bug Tracking System.
+#
+# The Initial Developer of the Original Code is Everything Solved, Inc.
+# Portions created by Everything Solved, Inc. are Copyright (C) 2007
+# Everything Solved, Inc. All Rights Reserved.
+#
+# Contributor(s): Max Kanat-Alexander <mkanat bugzilla org>
+
+package Bugzilla::Extension::GNOME::WebService;
+use strict;
+use warnings;
+use base qw(Bugzilla::WebService);
+use Bugzilla::Error;
+use Bugzilla::Util;
+use Bugzilla::Product;
+use Bugzilla::Version;
+use Bugzilla::User;
+
+# This can be called as Example.hello() from the WebService.
+sub addversionx {
+ my $self = shift;
+ my ($params) = @_;
+
+ my $cgi = Bugzilla->cgi;
+ ThrowUserError('product_admin_denied') unless i_am_cgi();
+ my @allowed_hosts = split(/[\s,]+/, Bugzilla->params->{"allowed-hosts"});
+ if (!grep {$_ eq $cgi->remote_addr} @allowed_hosts) {
+ ThrowUserError('product_admin_denied');
+ }
+
+ my $product_name = trim($params->{product})
+ || ThrowCodeError('param_required', { param => 'product' });
+
+ # We get parameters in a weird way for this script, separated by a |
+ my $new_version = trim($params->{version})
+ || ThrowCodeError('param_required', { param => 'version'});
+
+ my $product = Bugzilla::Product->check($product_name);
+
+ # If the full version already exists, we don't create a .x version.
+ my $version = new Bugzilla::Version({ product => $product, name => $new_version });
+ if ($version) {
+ return ", exists (", $product->name, ")";
+ }
+
+ # The version number, but ending in .x instead of its final number.
+ my $version_x = $new_version;
+ $version_x =~ s/^([\d\.]+)\.\d+$/$1.x/;
+
+ # The version number with explicitly two sets of digits and then ending
+ # in .x (for example, "2.22" would above become "2.x" but here it would
+ # become 2.22.x).
+ my $version_major_minor_x = $new_version;
+ $version_major_minor_x =~ s/^(\d*?)\.(\d*?)\..*/$1.$2.x/;
+
+ # Check if the higher v.x versions exist.
+ my $last_version_x;
+ while (1) {
+ my $version = new Bugzilla::Version({ product => $product, name => $version_x });
+ if ($version) {
+ return ", exists (", $product->name, ")";
+ }
+ $last_version_x = $version_x;
+ $version_x =~ s/^([\d\.]+)\.\d\.x+$/$1.x/;
+ # We go until we get to something like "3.x", which doesn't match the
+ # s/// regex, so it'll stay the same and we're done.
+ last if $version_x eq $last_version_x;
+ }
+
+ Bugzilla->set_user(Bugzilla::User->super_user);
+ Bugzilla::Version->create(
+ { value => $version_major_minor_x, product => $product });
+
+ return ", added";
+}
+
+1;
diff --git a/template/en/default/admin/params/gnome.html.tmpl
b/template/en/default/admin/params/gnome.html.tmpl
new file mode 100644
index 0000000..cf604af
--- /dev/null
+++ b/template/en/default/admin/params/gnome.html.tmpl
@@ -0,0 +1,31 @@
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Dave Miller <justdave bugzilla org>
+ # Frédéric Buclin <LpSolit gmail com>
+ #%]
+[%
+ title = "GNOME specific settings"
+ desc = "Set up parameters specific to GNOME infrastructure"
+%]
+
+[% param_descs = {
+
+ "allowed-hosts" =>
+ "IP addresses (one per line) which are allowed to add new versions to $terms.Bugzilla .",
+
+} %]
diff --git a/template/en/default/gnome/README b/template/en/default/gnome/README
new file mode 100644
index 0000000..ff18c64
--- /dev/null
+++ b/template/en/default/gnome/README
@@ -0,0 +1,16 @@
+Normal templates go in this directory. You can load them in your
+code like this:
+
+use Bugzilla::Error;
+my $template = Bugzilla->template;
+$template->process('gnome/some-template.html.tmpl')
+ or ThrowTemplateError($template->error());
+
+That would be how to load a file called some-template.html.tmpl that
+was in this directory.
+
+Note that you have to be careful that the full path of your template
+never conflicts with a template that exists in Bugzilla or in
+another extension, or your template might override that template. That's why
+we created this directory called 'gnome' for you, so you
+can put your templates in here to help avoid conflicts.
\ No newline at end of file
diff --git a/template/en/default/hook/README b/template/en/default/hook/README
new file mode 100644
index 0000000..e6c4add
--- /dev/null
+++ b/template/en/default/hook/README
@@ -0,0 +1,5 @@
+Template hooks go in this directory. Template hooks are called in normal
+Bugzilla templates like [% Hook.process('some-hook') %].
+More information about them can be found in the documentation of
+Bugzilla::Extension. (Do "perldoc Bugzilla::Extension" from the main
+Bugzilla directory to see that documentation.)
\ No newline at end of file
diff --git a/template/en/default/hook/admin/classifications/edit-common-rows.html.tmpl
b/template/en/default/hook/admin/classifications/edit-common-rows.html.tmpl
new file mode 100644
index 0000000..cd2b8cc
--- /dev/null
+++ b/template/en/default/hook/admin/classifications/edit-common-rows.html.tmpl
@@ -0,0 +1,12 @@
+
+[% DEFAULT
+ classification.is_gnome = 0
+%]
+
+ <tr>
+ <th align="right"><label for="is_gnome">GNOME:</label></th>
+ <td><input name="is_gnome" type="checkbox"
+ value="1" [% 'checked="checked"' IF classification.is_gnome %]></td>
+ </tr>
+
+
diff --git a/template/en/default/hook/admin/classifications/updated-changes.html.tmpl
b/template/en/default/hook/admin/classifications/updated-changes.html.tmpl
new file mode 100644
index 0000000..941c5df
--- /dev/null
+++ b/template/en/default/hook/admin/classifications/updated-changes.html.tmpl
@@ -0,0 +1,10 @@
+
+[% IF changes.is_gnome.defined %]
+ <p>
+ Updated is_gnome from
+ [%+ changes.is_gnome.0 FILTER html %] to
+ [%+ classification.is_gnome FILTER html %].
+ </p>
+[% END %]
+
+
diff --git a/template/en/default/hook/attachment/createformcontents-mimetypes.html.tmpl
b/template/en/default/hook/attachment/createformcontents-mimetypes.html.tmpl
new file mode 100644
index 0000000..ac9392c
--- /dev/null
+++ b/template/en/default/hook/attachment/createformcontents-mimetypes.html.tmpl
@@ -0,0 +1,2 @@
+[% mimetypes.push({type => "application/x-compressed-tar", desc => "tar compressed archive"}) %]
+
diff --git a/template/en/default/hook/global/variables-end.none.tmpl
b/template/en/default/hook/global/variables-end.none.tmpl
new file mode 100644
index 0000000..e2e82ba
--- /dev/null
+++ b/template/en/default/hook/global/variables-end.none.tmpl
@@ -0,0 +1,21 @@
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Everything Solved, Inc.
+ # Portions created by the Initial Developer are Copyright (C) 2010
+ # the Initial Developer. All Rights Reserved.
+ #
+ # Contributor(s):
+ # Max Kanat-Alexander <mkanat bugzilla org>
+ #%]
+
+[% terms.Bugzilla = "GNOME Bugzilla" %]
diff --git a/template/en/default/pages/403.html.tmpl b/template/en/default/pages/403.html.tmpl
new file mode 100644
index 0000000..8e75d13
--- /dev/null
+++ b/template/en/default/pages/403.html.tmpl
@@ -0,0 +1,11 @@
+[% PROCESS global/header.html.tmpl %]
+
+<h1>Either your network or ip address has been banned from [% terms.Bugzilla %]</h1>
+
+<p>If you feel that this is unwarranted, feel free to include your IP
+ address in the subject of <a href="mailto:bugmaster@gnome.org">an
+ email</a>, and we will examine why there is a ban. If you fail to
+ include the IP address (again, in the subject!), then your message will
+ be deleted and ignored.</p>
+
+[% PROCESS global/footer.html.tmpl %]
diff --git a/template/en/default/pages/email.html.tmpl b/template/en/default/pages/email.html.tmpl
new file mode 100644
index 0000000..3bfc804
--- /dev/null
+++ b/template/en/default/pages/email.html.tmpl
@@ -0,0 +1,124 @@
+[%# -*- mode: html -*- %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Initial Developer of the Original Code is Elijah Newren
+ #
+ #%]
+
+[%# INTERFACE:
+ # This template has no interface.
+ #%]
+
+[% PROCESS global/variables.none.tmpl %]
+
+[% PROCESS global/header.html.tmpl
+ title = "About Bugzilla email" %]
+
+<p>
+This page can help you
+<ul>
+ <li>Understand why you received email.</li>
+ <li>Learn how to stop receiving email.</li>
+ <li>Figure out how to change the conditions causing you receive
+ email, including turning email notifications off entirely.</li>
+ <li>Explain why you can't respond via email.</li>
+ <li>How you can get help if things don't seem to be working.</li>
+</ul>
+</p>
+
+<b>Why you receive email</b>
+<p>
+[% terms.Bugzilla %] sends out email to notify you of changes to [% terms.bugs %] you
+reported, modified, put yourself on the cc list, etc. The full list
+of reasons can be found at <a
+href="userprefs.cgi">[% Param("urlbase") %]userprefs.cgi</a>.
+There is [% terms.abug %] in the system in that it defaults to sending out mail
+when other [% terms.bugs %] are marked as a duplicate of the [% terms.bug %] you are watching;
+we intend to make that a configuration option defaulting to off.
+Sorry for the annoyance.
+</p>
+
+<b>How to stop receiving email</b>
+<p>
+If you are on the CC (carbon copy) list of any [% terms.Bugzilla %] [% terms.bug %] report
+you can easily remove yourself. You receive a link
+to the corresponding report in the last line of every email you get from
+[% terms.Bugzilla %]. The link is also at the top. In order to unsubscribe
+open the report, scroll down to the bottom, select your email address within
+the CC: box, tick <i>Remove selected CCs</i> and press the
+"Submit Changes" button. <br>
+
+For other cases please refer to the comprehensive email settings
+mentioned below. <br>
+
+Please keep in mind that we may depend on additional information from you to
+successfully tackle a software problem we all would like to see resolved.
+</p>
+
+<b>How to change when (or if) you get email.</b>
+<p>
+Go to <a
+href="userprefs.cgi?tab=email">[% Param("urlbase") %]userprefs.cgi?tab=email</a>
+and unselect (or select) any relevant boxes for when you don't want to
+get email. If you want to disable email entirely, click on the
+"Disable All Mail" button. After any changes, make sure to press the
+"Submit Changes" button at the bottom of the page.
+</p>
+
+<b>Why you can't respond via email.</b>
+<p>
+Our version of [% terms.Bugzilla %] is simply a modified (albeit heavily)
+version of mozilla's <a href="http://www.bugzilla.org/">bugzilla</a>. They
+provide no program to analyze emails, add relevant messages to the
+[% terms.Bugzilla %] database, and send out updated emails to the relevant
+individuals. We haven't written one either. Part of the reason for
+this is that it's a really hard problem:
+</p>
+<ul>
+ <li>There are lots of braindead mail clients that send emails in
+ both text and html. [% terms.Bugzilla %] comments should be text only.</li>
+ <li>Email clients and people often stick long footers on emails,
+ which would reduce readability unless they were removed.</li>
+ <li>People and email clients are horribly inconsistent about quoting
+ previous text, making it hard to prevent each comment from
+ including several previous comments with zillions of levels of
+ quoting. Such a scenario would make [% terms.bugs %] completely unreadable
+ with the web interface.</li>
+ <li>People do stupid braindead things like sending out-of-office
+ auto-replies to [% terms.Bugzilla %] messages; we don't want that spam being
+ archived and showing up in everyone's inboxes. (So any program
+ analyzing emails needs to be able to discover these messages and
+ automatically disable the person's account.)</li>
+ <li>The standard issues -- how does one determine which fields
+ should be changed via an email? How does one differentiate that
+ from normal text? When [% terms.abug %] is filed against [% terms.Bugzilla %] itself,
+ how do we differentiate comments explaining how to send an email
+ in a way to change fields in [% terms.abug %] and actual attempt to change
+ fields within that bug?</li>
+ <li>Probably several more issues that we haven't thought of
+ yet.</li>
+</ul>
+<p>
+What this means is that if you want to send a response to someone, you
+need to use the webform by going to the link specified in the email
+sent to you. If you are having problems with the system itself,
+contact the bugsquad or bugmasters (see last section of this page).
+Any email responses you send at this time will be discarded.
+</p>
+
+<b>Where to go for further help</b>
+<p>
+If things aren't working or you have a question not answered here
+about the email system, feel free to email gnome-bugsquad AT gnome dot
+org or bugmaster AT gnome dot org.
+</p>
+
+[% PROCESS global/footer.html.tmpl %]
diff --git a/template/en/default/pages/points.html.tmpl b/template/en/default/pages/points.html.tmpl
new file mode 100644
index 0000000..54bcabf
--- /dev/null
+++ b/template/en/default/pages/points.html.tmpl
@@ -0,0 +1,78 @@
+[%# -*- mode: html -*- %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Initial Developer of the Original Code is Elijah Newren
+ #
+ #%]
+
+[%# INTERFACE:
+ # This template has no interface.
+ #%]
+
+[% PROCESS global/variables.none.tmpl %]
+
+[% PROCESS global/header.html.tmpl
+ title = "The 'Points' statistic" %]
+
+<p>
+Points is a fun statistic in [% terms.Bugzilla %]. It roughly
+measures how active you are in this [% terms.Bugzilla %] installation,
+and could be thought of as a form of aggregate-over-time score from
+the <a href="reports/weekly-bug-summary.cgi">Weekly [% terms.Bug %]
+Summary</a>. The scoring mechanism is subject to the whim of the
+bugmasters, so don't take too much stock in it. But it makes for a
+fun competition, by yourself or with others. How many points do <a
+href="describeuser.cgi"><i>you</i></a> have? Just a little more work
+could get you up to the next level. :-)
+</p>
+
+<p>
+You can compare yourself to how many points other people have at the
+<a href="reports/points.cgi">users per points</a> page. Watch out,
+though, if you try to inflate your score without doing <i>useful</i>
+work in [% terms.Bugzilla %], you may find your score manually altered
+in a very negative way. If lots of people do this, we'll just alter
+the entire thing. In particular, we are already considering replacing
+showing of points on each [% terms.bug %] page by some kind of <a
+href="show_bug.cgi?id=325562">more general descriptions</a>.
+</p>
+
+<p>
+The original idea behind points was that having a rough measure of how
+active a person was in [% terms.Bugzilla %] might help triagers
+(bugsquad volunteers) who are getting started by helping them know:
+<ul>
+ <li> which [% terms.bugs %] to avoid because they are either filed
+ by or being handled by an experienced user</li>
+ <li> whose comments are more likely to be worth learning from</li>
+</ul>
+but that is a somewhat error prone use of points as expert hackers or
+heavy users of distro [% terms.bug %] trackers might not have done as
+much in Gnome [% terms.Bugzilla %] and thus their points score might
+be 20 below what their 'experience' level might really reflect. A
+much more important criteria to show is whether the person is a
+developer of the relevant module or the reporter of the given [%
+terms.bug %] (both of which are currently shown in addition to
+points). However, even as an error prone rough estimate, it's still
+better than no information and might still be useful for such
+purposes. Just realize that if you use it this way it's no silver
+bullet.
+</p>
+
+<p>
+The current formula for points (remember, this is subject to change on
+the whim of the bugmasters) is:
+ <blockquote>
+ log_10(1 + #comments) + log_2(1 + #bugs_closed) + log_2(1 + #bugs_reported)
+ </blockquote>
+</p>
+
+[% PROCESS global/footer.html.tmpl %]
diff --git a/template/en/default/pages/reports.html.tmpl b/template/en/default/pages/reports.html.tmpl
new file mode 100644
index 0000000..25384a9
--- /dev/null
+++ b/template/en/default/pages/reports.html.tmpl
@@ -0,0 +1,180 @@
+[%# -*- mode: html -*- %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Olav Vitters
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Olav Vitters Corporation. All
+ # Rights Reserved.
+ #
+ #%]
+
+[%# INTERFACE:
+ # This template has no interface.
+ #%]
+
+[% PROCESS global/variables.none.tmpl %]
+
+[% PROCESS global/header.html.tmpl
+ title = "Reports" %]
+
+
+<h3>Categories</h3>
+ <ul>
+ <li> <a href="[% self_url FILTER html %]#generic">Generic Gnome reports</a> </li>
+ <!--
+ <li> <a href="[% self_url FILTER html %]#byversion">Reports organized
+ by version</a> </li> -->
+ <li> <a href="[% self_url FILTER html %]#explain">Explanation of [% terms.bugzilla %] terms and
fields</a></li>
+ </ul>
+
+<h2>Generic Gnome reports<a name="generic"></a></h2>
+ <ul>
+ <li>
+ <a href="page.cgi?id=weekly-bug-summary.html">Summary of [%
+ terms.bug %] activity for the last week</a>.
+ </li>
+ <li>
+ <a href="duplicates.cgi">Frequently (and recently)
+ duplicated [% terms.bugs %]</a>
+ </li>
+ <li>
+ <a href="page.cgi?id=popular-traces.html">Frequently Duplicated Stack
+ Traces</a>
+ </li>
+ <!--
+ <li>
+ Products with the <a href="reports/patch-diligence-report.cgi">
+ fewest unreviewed patches per total patches</a>.
+ </li>
+ -->
+ <!--
+ <li>Unreviewed patches:
+ <ul>
+ <li>
+ <a href="reports/patch-report.cgi"> Comprehensive listing</a> (or by
+ <a href="reports/patch-status.cgi"> product</a>).
+ </li>
+ </ul>
+ </li>
+ -->
+ <li>
+ <a href="query.cgi?format=report-table">Generic tabular reports</a>
+ </li>
+ <li>
+ <a href="query.cgi?format=report-graph">Generic graphical reports</a>
+ </li>
+ </ul>
+
+<h2>Reports for Potential Contributors<a name="contributors"></a></h2>
+ <ul>
+ <li>[% terms.Bugs %] to <a href="http://live.gnome.org/Bugsquad/TriageGuide">triage</a></li>
+ <!--
+ <ul>
+ <li>
+ <a href="reports/core-bugs-today.cgi">[% terms.Bugs %] filed
+ today</a> against components listed at <a href=
+ "http://www.gnome.org/start/unstable/modules/">
+ gnome.org/start/</a> as core GNOME components. </li>
+ <li>
+ <a href="reports/needinfo-updated.cgi">NEEDINFO reports
+ which have been updated</a> (e.g. given new info).
+ </li>
+ <li>
+ <a href="reports/unconfirmed-bugs.cgi">Products with the
+ most UNCONFIRMED [% terms.bugs %]</a>. Good starting point
+ for new bughunters looking to triage [% terms.bugs %].
+ </li>
+ <li>
+ <a href="reports/check-assignedto.cgi">[% terms.Bugs %]
+ likely not correctly assigned to the correct owner</a>.
+ Shows [% terms.bugs %] owned by the default owner of another
+ component.
+ </li>
+ </ul>
+ -->
+ <li>Finding tasks to work on</li>
+ <ul>
+ <!--
+ <li>
+ [% terms.Bugs %] marked by developers as being <a
+ href="reports/gnome-love.cgi">good tasks for new
+ developers</a>
+ </li>
+ -->
+ <li>
+ Looking at <a href="browse.cgi">product overviews</a>
+ </li>
+ <li>
+ <a href="http://live.gnome.org/JoinGnome">Other ways to help
+ Gnome</a>
+ </li>
+ </ul>
+ </ul>
+
+<!--
+<h2>Reports organized by version<a name="byversion"></a></h2>
+ <ul>
+ <li> Open [% terms.bugs %] for specific GNOME versions, broken down by
+ product, component, and developer:
+ <ul>
+ <li><a href="reports/gnome-218-report.html">GNOME 2.17/2.18</a> </li>
+ <li><a href="reports/gnome-220-report.html">GNOME 2.19/2.20</a> </li>
+ <li><a href="reports/gnome-222-report.html">GNOME 2.21/2.22</a> </li>
+ </ul>
+ </li>
+ <li> Summary of [% terms.bug %] activity for the last week, by GNOME version:
+ <ul>
+ <li> <a href="reports/weekly-bug-summary.cgi?version=2.17/2.18">GNOME 2.17/2.18</a></li>
+ <li> <a href="reports/weekly-bug-summary.cgi?version=2.19/2.20">GNOME 2.19/2.20</a></li>
+ <li> <a href="reports/weekly-bug-summary.cgi?version=2.21/2.22">GNOME 2.21/2.22</a></li>
+ </ul>
+ </li>
+ </ul>
+-->
+
+<h2>Explanation of various [% terms.bugzilla %] terms and fields<a name="explain"></a></h2>
+ <ul>
+ <li>
+ <a href="describecomponents.cgi">Products</a>
+ </li>
+ <li>
+ <a href="page.cgi?id=fields.html">[% terms.Bug %] Fields</a>
+ <ul>
+ <li>
+ <a href="page.cgi?id=fields.html#status">[% terms.Bug %] status</a>
+ </li>
+ <li>
+ <a href="page.cgi?id=fields.html#resolution">Resolution</a>
+ </li>
+ <li>
+ <a href="page.cgi?id=fields.html#severity">Severities</a>
+ </li>
+ <li>
+ <a href="page.cgi?id=fields.html#priority">Priorities</a>
+ </li>
+ <li>
+ <a href="page.cgi?id=fields.html#gnome_version">Gnome Version</a>
+ </li>
+ <li>
+ <a href="page.cgi?id=fields.html#gnome_target">Gnome Target Milestone</a>
+ </li>
+ </ul>
+ </li>
+ <li>
+ <a href="describekeywords.cgi">Keywords</a>
+ </li>
+ </ul>
+
+If you have questions or suggestions for new reports, email the [% IF user.id %]<a href="mailto:bugmaster
gnome org">[% END %] Gnome bugmasters.[% IF user.id %]</a>[% END %]<br><br>
+
+[% PROCESS global/footer.html.tmpl %]
diff --git a/test.py b/test.py
new file mode 100644
index 0000000..27c83c6
--- /dev/null
+++ b/test.py
@@ -0,0 +1,16 @@
+#!/usr/bin/python
+
+import xmlrpclib
+import sys
+server = xmlrpclib.ServerProxy('http://127.0.0.1/xmlrpc.cgi')
+try:
+ result = server.GNOME.addversionx({'product': 'lalala', 'version': '1.2.3.4'})
+except xmlrpclib.Fault, e:
+ print "FAILED (%s)" % e.faultString
+ sys.exit(1)
+except Exception, e:
+ print "FAILED (%s)" % e.strerror
+ sys.exit(1)
+else:
+ print result
+ sys.exit(0)
diff --git a/web/README b/web/README
new file mode 100644
index 0000000..2345641
--- /dev/null
+++ b/web/README
@@ -0,0 +1,7 @@
+Web-accessible files, like JavaScript, CSS, and images go in this
+directory. You can reference them directly in your HTML. For example,
+if you have a file called "style.css" and your extension is called
+"Foo", you would put it in "extensions/Foo/web/style.css", and then
+you could link to it in HTML like:
+
+<link href="extensions/Foo/web/style.css" rel="stylesheet" type="text/css">
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]