Remove useXXX parameters and use $field->enabled instead;

Make Bugzilla object always accessible in templates;
Allow only specific tweaks for standard fields and show which ones are allowed in the UI.
hinted-selects
Vitaliy Filippov 2014-08-01 21:13:45 +04:00
parent 02050d63c6
commit 152654312b
94 changed files with 518 additions and 958 deletions

View File

@ -106,9 +106,8 @@ sub DB_COLUMNS
version version
); );
# FIXME kill op_sys and rep_platform completely, make them custom fields # FIXME kill op_sys and rep_platform completely, make them custom fields
# FIXME change useplatform/useopsys/useqacontact to "field(xxx).is_obsolete" push @columns, 'op_sys' if Bugzilla->get_field('op_sys')->enabled;
push @columns, 'op_sys' if Bugzilla->params->{useopsys}; push @columns, 'rep_platform' if Bugzilla->get_field('rep_platform')->enabled;
push @columns, 'rep_platform' if Bugzilla->params->{useplatform};
push @columns, map { $_->name } push @columns, map { $_->name }
grep { $_->type != FIELD_TYPE_MULTI_SELECT && $_->type != FIELD_TYPE_BUG_ID_REV } grep { $_->type != FIELD_TYPE_MULTI_SELECT && $_->type != FIELD_TYPE_BUG_ID_REV }
Bugzilla->active_custom_fields; Bugzilla->active_custom_fields;
@ -299,7 +298,7 @@ sub new
if (!ref $param && $param !~ /^\d+$/) if (!ref $param && $param !~ /^\d+$/)
{ {
# But only if aliases are enabled. # But only if aliases are enabled.
if (Bugzilla->params->{usebugaliases} && $param) if (Bugzilla->get_field('alias')->enabled && $param)
{ {
$param = { name => $param }; $param = { name => $param };
} }
@ -726,7 +725,7 @@ sub check_default_values
for (qw(target_milestone version)) for (qw(target_milestone version))
{ {
my $f = Bugzilla->get_field($_); my $f = Bugzilla->get_field($_);
$self->set($_, undef) if !$f->obsolete && (!$f->nullable && !$self->{$_} || !exists $self->{$_}); $self->set($_, undef) if $f->enabled && (!$f->nullable && !$self->{$_} || !exists $self->{$_});
} }
# Remove NULLs for custom fields # Remove NULLs for custom fields
for my $field (Bugzilla->get_fields({ custom => 1, obsolete => 0 })) for my $field (Bugzilla->get_fields({ custom => 1, obsolete => 0 }))
@ -1042,7 +1041,7 @@ sub _check_bug_status
# Check musthavemilestoneonaccept. # Check musthavemilestoneonaccept.
if ($self->id && $new_status->is_assigned if ($self->id && $new_status->is_assigned
&& Bugzilla->params->{usetargetmilestone} && Bugzilla->get_field('target_milestone')->enabled
&& Bugzilla->params->{musthavemilestoneonaccept} && Bugzilla->params->{musthavemilestoneonaccept}
&& !$self->target_milestone) && !$self->target_milestone)
{ {
@ -1729,7 +1728,7 @@ sub _set_alias
{ {
my ($self, $alias) = @_; my ($self, $alias) = @_;
$alias = trim($alias); $alias = trim($alias);
return undef if !Bugzilla->params->{usebugaliases}; return undef if Bugzilla->get_field('alias')->enabled;
return $self->{alias} = undef if !$alias; return $self->{alias} = undef if !$alias;
# Make sure the alias isn't too long. # Make sure the alias isn't too long.
@ -2168,8 +2167,8 @@ sub _set_qa_contact
my $id; my $id;
if (!$self->id) if (!$self->id)
{ {
# Bugs get no QA Contact on creation if useqacontact is off. # Bugs get no QA Contact on creation if qa_contact is off.
return undef if !Bugzilla->params->{useqacontact}; return undef if !Bugzilla->get_field('qa_contact')->enabled;
# Set the default QA Contact if one isn't specified or if the # Set the default QA Contact if one isn't specified or if the
# user doesn't have editbugs. # user doesn't have editbugs.
@ -2252,7 +2251,7 @@ sub _set_status_whiteboard
sub _set_target_milestone sub _set_target_milestone
{ {
my ($self, $target) = @_; my ($self, $target) = @_;
if (!Bugzilla->params->{usetargetmilestone}) if (!Bugzilla->get_field('target_milestone')->enabled)
{ {
# Don't change value if the field is disabled # Don't change value if the field is disabled
return undef; return undef;
@ -3145,7 +3144,7 @@ sub qa_contact
{ {
my ($self) = @_; my ($self) = @_;
return $self->{qa_contact_obj} if exists $self->{qa_contact_obj} || !$self->{qa_contact}; return $self->{qa_contact_obj} if exists $self->{qa_contact_obj} || !$self->{qa_contact};
if (Bugzilla->params->{useqacontact} && $self->{qa_contact}) if (Bugzilla->get_field('qa_contact')->enabled && $self->{qa_contact})
{ {
$self->{qa_contact_obj} = new Bugzilla::User($self->{qa_contact}); $self->{qa_contact_obj} = new Bugzilla::User($self->{qa_contact});
} }
@ -3251,7 +3250,7 @@ sub show_attachment_flags
sub use_votes sub use_votes
{ {
my ($self) = @_; my ($self) = @_;
return Bugzilla->params->{usevotes} && $self->product_obj->votes_per_user > 0; return Bugzilla->get_field('votes')->enabled && $self->product_obj->votes_per_user > 0;
} }
sub groups sub groups
@ -3334,7 +3333,7 @@ sub user
my $unknown_privileges = $user->in_group('editbugs', $prod_id); my $unknown_privileges = $user->in_group('editbugs', $prod_id);
my $canedit = $unknown_privileges || $user->id == $self->{assigned_to} my $canedit = $unknown_privileges || $user->id == $self->{assigned_to}
|| (Bugzilla->params->{useqacontact} && $self->{qa_contact} && $user->id == $self->{qa_contact}); || (Bugzilla->get_field('qa_contact')->enabled && $self->{qa_contact} && $user->id == $self->{qa_contact});
my $canconfirm = $unknown_privileges || $user->in_group('canconfirm', $prod_id); my $canconfirm = $unknown_privileges || $user->in_group('canconfirm', $prod_id);
my $isreporter = $user->id && $user->id == $self->{reporter}; my $isreporter = $user->id && $user->id == $self->{reporter};
@ -3967,7 +3966,7 @@ sub check_can_change_field
} }
# Allow the QA contact to change anything else. # Allow the QA contact to change anything else.
if (Bugzilla->params->{useqacontact} && if (Bugzilla->get_field('qa_contact')->enabled &&
($self->{qa_contact} && $self->{qa_contact} == $user->id || ($self->{qa_contact} && $self->{qa_contact} == $user->id ||
$self->{_old_self} && $self->{_old_self}->{qa_contact} == $user->id)) $self->{_old_self} && $self->{_old_self}->{qa_contact} == $user->id))
{ {

View File

@ -408,7 +408,7 @@ sub Send
$recipients{$reporter}->{+REL_REPORTER} = BIT_DIRECT; $recipients{$reporter}->{+REL_REPORTER} = BIT_DIRECT;
# QA Contact # QA Contact
if (Bugzilla->params->{useqacontact}) if (Bugzilla->get_field('qa_contact')->enabled)
{ {
foreach (@qa_contacts) foreach (@qa_contacts)
{ {

View File

@ -283,7 +283,7 @@ sub _check_initialqacontact
my ($invocant, $qa_contact) = @_; my ($invocant, $qa_contact) = @_;
my $qa_contact_id; my $qa_contact_id;
if (Bugzilla->params->{useqacontact}) if (Bugzilla->get_field('qa_contact')->enabled)
{ {
$qa_contact_id = Bugzilla::User->check($qa_contact)->id if $qa_contact; $qa_contact_id = Bugzilla::User->check($qa_contact)->id if $qa_contact;
} }

View File

@ -33,6 +33,8 @@ use strict;
use Bugzilla::Status; use Bugzilla::Status;
our $sortkey = 500;
sub check_bug_status sub check_bug_status
{ {
my $bug_status = shift; my $bug_status = shift;
@ -55,23 +57,24 @@ sub check_resolution
return ""; return "";
} }
our $sortkey = 500;
sub get_param_list sub get_param_list
{ {
my $class = shift; my $class = shift;
# Hardcoded bug statuses which existed before Bugzilla 3.1. # Hardcoded bug statuses and resolutions which existed before Bugzilla 3.1.
my @closed_bug_statuses = ('RESOLVED', 'VERIFIED', 'CLOSED'); my @closed_bug_statuses = qw(RESOLVED VERIFIED CLOSED);
my @resolutions = qw(FIXED INVALID WONTFIX LATER REMIND DUPLICATE WORKSFORME MOVED);
# If we are upgrading from 3.0 or older, bug statuses are not customisable # If we are upgrading from 3.0 or older, bug statuses are not customisable
# and bug_status.is_open is not yet defined (hence the eval), so we use # and bug_status.is_open is not yet defined (hence the eval), so we use
# the bug statuses above as they are still hardcoded. # the bug statuses above as they are still hardcoded.
eval eval
{ {
my @current_closed_states = map { $_->name } grep { !$_->is_open } Bugzilla::Status->get_all; my @st = map { $_->name } grep { !$_->is_open } Bugzilla::Status->get_all;
# If no closed state was found, use the default list above. my @res = map { $_->name } @{ Bugzilla->get_field('resolution')->legal_values };
@closed_bug_statuses = @current_closed_states if scalar(@current_closed_states); # If no closed states and resolutions were found was found, use the default list above.
@closed_bug_statuses = @st if @st;
@resolutions = @res if @res;
}; };
my @param_list = ( my @param_list = (
@ -85,7 +88,8 @@ sub get_param_list
{ {
name => 'duplicate_resolution', name => 'duplicate_resolution',
type => 't', type => 's',
choices => \@resolutions,
default => 'DUPLICATE', default => 'DUPLICATE',
checker => \&check_resolution, checker => \&check_resolution,
}, },
@ -131,6 +135,38 @@ sub get_param_list
type => 'b', type => 'b',
default => 1, default => 1,
}, },
{
name => 'auto_add_flag_requestees_to_cc',
type => 'b',
default => 1,
},
{
name => 'clear_requests_on_close',
type => 'b',
default => 1,
},
{
name => 'unauth_bug_details',
type => 'b',
default => 0,
},
{
name => 'preview_comment_lines',
type => 't',
default => '30',
checker => \&check_numeric,
},
{
name => 'comment_line_length',
type => 't',
default => '80',
checker => \&check_numeric,
},
); );
return @param_list; return @param_list;
} }

View File

@ -1,166 +0,0 @@
# -*- 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::Config::BugFields;
use strict;
use Bugzilla::Config::Common;
use Bugzilla::Field;
use constant USENAMES => {
useclassification => 'classification',
usetargetmilestone => 'target_milestone',
useqacontact => 'qa_contact',
usestatuswhiteboard => 'status_whiteboard',
usevotes => 'votes',
usebugaliases => 'alias',
use_see_also => 'see_also',
useplatform => 'rep_platform',
useopsys => 'op_sys',
};
our $sortkey = 600;
# A bridge from products.classification_id to fielddefs.visibility_field
sub set_useclassification
{
my ($value, $param) = @_;
$_[0] = $value ? 1 : 0;
my $f = Bugzilla->get_field('classification');
$f->set_obsolete($value ? 0 : 1);
$f->update;
my $vf = $value ? $f->id : undef;
$f = Bugzilla->get_field('product');
$f->set_value_field($vf);
$f->update;
return '';
}
# A bridge from useXXX to fielddefs.obsolete (FIXME: This should be removed at some point)
sub set_usefield
{
my ($value, $param) = @_;
my $f = Bugzilla->get_field(USENAMES->{$param->{name}});
$_[0] = $value ? 1 : 0;
$f->set_obsolete($value ? 0 : 1);
$f->update;
return '';
}
sub get_param_list
{
return (
{
name => 'useclassification',
type => 'b',
default => 0,
checker => \&set_useclassification,
},
{
name => 'usetargetmilestone',
type => 'b',
default => 0,
checker => \&set_usefield,
},
{
name => 'useqacontact',
type => 'b',
default => 0,
checker => \&set_usefield,
},
{
name => 'usestatuswhiteboard',
type => 'b',
default => 0,
checker => \&set_usefield,
},
{
name => 'usevotes',
type => 'b',
default => 0,
checker => \&set_usefield,
},
{
name => 'usebugaliases',
type => 'b',
default => 0,
checker => \&set_usefield,
},
{
name => 'use_see_also',
type => 'b',
default => 1,
checker => \&set_usefield,
},
{
name => 'useplatform',
type => 'b',
default => 1,
checker => \&set_usefield,
},
{
name => 'auto_add_flag_requestees_to_cc',
type => 'b',
default => 1,
},
{
name => 'useopsys',
type => 'b',
default => 1,
checker => \&set_usefield,
},
{
name => 'clear_requests_on_close',
type => 'b',
default => 1,
},
{
name => 'unauth_bug_details',
type => 'b',
default => 0,
},
{
name => 'comment_line_length',
type => 't',
default => '80',
checker => \&check_numeric,
},
{
name => 'preview_comment_lines',
type => 't',
default => '30',
checker => \&check_numeric,
},
);
}
1;

View File

@ -203,6 +203,18 @@ use constant DEFAULT_FIELDS => (map { my $i = 0; $_ = { (map { (DEFAULT_FIELD_CO
[ 'see_also', 'See Also', 0, 1, 0, FIELD_TYPE_BUG_URLS ], [ 'see_also', 'See Also', 0, 1, 0, FIELD_TYPE_BUG_URLS ],
)); ));
# Tweaks allowed for standard field properties
use constant CAN_TWEAK => {
obsolete => { map { $_ => 1 } qw(alias classification op_sys qa_contact rep_platform see_also status_whiteboard target_milestone votes) },
clone_bug => { map { $_ => 1 } qw(short_desc version rep_platform bug_file_loc op_sys status_whiteboard
keywords bug_severity priority component assigned_to votes qa_contact dependson blocked target_milestone estimated_time remaining_time see_also) },
default_value => { map { $_ => 1 } qw(bug_severity deadline keywords op_sys priority rep_platform short_desc status_whiteboard target_milestone version) },
nullable => { map { $_ => 1 } qw(alias bug_severity deadline keywords op_sys priority rep_platform status_whiteboard target_milestone version) },
visibility_field_id => { map { $_ => 1 } qw(bug_severity op_sys priority rep_platform status_whiteboard target_milestone version) },
value_field_id => { map { $_ => 1 } qw(bug_severity op_sys priority rep_platform) },
default_field_id => { map { $_ => 1 } qw(bug_severity keywords op_sys priority component rep_platform status_whiteboard) },
};
################ ################
# Constructors # # Constructors #
################ ################
@ -466,6 +478,8 @@ a boolean specifying whether or not the field is obsolete
sub obsolete { return $_[0]->{obsolete} } sub obsolete { return $_[0]->{obsolete} }
sub enabled { return !$_[0]->{obsolete} }
=over =over
=item C<nullable> =item C<nullable>
@ -534,6 +548,20 @@ sub value_type
return Bugzilla::Field::Choice->type($self); return Bugzilla::Field::Choice->type($self);
} }
# Checks if a certain property can be changed for this field (either it is custom or standard)
sub can_tweak
{
my $self = shift;
my ($prop) = @_;
return $self->name !~ /^attachments\./ && $self->name ne 'longdesc' if $prop eq 'mailhead';
$prop = 'clone_bug' if $prop eq 'clone_field_id';
$prop = 'nullable' if $prop eq 'null_field_id';
return 0 if !$self->custom && !CAN_TWEAK->{$prop}->{$self->name};
return $self->type && $self->type != FIELD_TYPE_BUG_ID_REV if $prop eq 'default_value' || $prop eq 'nullable';
return $self->is_select if $prop eq 'value_field_id';
return 1;
}
# Includes disabled values is $include_disabled = true # Includes disabled values is $include_disabled = true
sub legal_values sub legal_values
{ {
@ -997,6 +1025,12 @@ sub update
} }
my ($changes, $old_self) = $self->SUPER::update(@_); my ($changes, $old_self) = $self->SUPER::update(@_);
Bugzilla->refresh_cache_fields; Bugzilla->refresh_cache_fields;
if ($self->{name} eq 'classification')
{
my $prod = Bugzilla->get_field('product');
$prod->set_value_field($self->obsolete ? $self->id : undef);
$prod->update;
}
return wantarray ? ($changes, $old_self) : $changes; return wantarray ? ($changes, $old_self) : $changes;
} }

View File

@ -10,7 +10,6 @@ package Bugzilla::Field::Choice;
use base qw(Bugzilla::Object); use base qw(Bugzilla::Object);
use Bugzilla::Config qw(SetParam write_params); use Bugzilla::Config qw(SetParam write_params);
use Bugzilla::Config::BugFields;
use Bugzilla::Constants; use Bugzilla::Constants;
use Bugzilla::Error; use Bugzilla::Error;
use Bugzilla::Field; use Bugzilla::Field;

View File

@ -4019,25 +4019,6 @@ sub _make_fieldvaluecontrol
} }
} }
} }
# FIXME: Remove useXXX and defaultXXX parameters and make this migration only once
# Copy useXXX parameter values to fielddefs.is_obsolete
if (Bugzilla->params->{useclassification})
{
my ($cl_id) = $dbh->selectrow_array('SELECT id FROM fielddefs WHERE name=\'classification\'');
$dbh->do('UPDATE fielddefs SET value_field_id=? WHERE name=\'product\'', undef, $cl_id);
}
else
{
$dbh->do('UPDATE fielddefs SET value_field_id=NULL WHERE name=\'product\'');
}
require Bugzilla::Config::BugFields;
my $h = Bugzilla::Config::BugFields->USENAMES;
for (keys %$h)
{
$dbh->do('UPDATE fielddefs SET obsolete=? WHERE name=?', undef, Bugzilla->params->{$_} ? 0 : 1, $h->{$_});
}
} }
# Change all integer keys to INT4 # Change all integer keys to INT4
@ -4210,6 +4191,18 @@ sub _move_old_defaults
} }
} }
} }
my %old_use = qw(useclassification classification usetargetmilestone target_milestone
useqacontact qa_contact usestatuswhiteboard status_whiteboard usevotes votes
usebugaliases alias use_see_also see_also useplatform rep_platform useopsys op_sys);
while (my ($p, $f) = each %old_use)
{
if (exists $old_params->{$p} && ($f = Bugzilla->get_field($f)))
{
print (($old_params->{$p} ? "Enabling " : "Disabling ").$f->description."\n");
$f->set_obsolete($old_params->{$p} ? 0 : 1);
$f->update;
}
}
} }
1; 1;

View File

@ -545,7 +545,7 @@ sub _check_classification_id
my ($invocant, $classification_name) = @_; my ($invocant, $classification_name) = @_;
my $classification_id = 1; my $classification_id = 1;
if (Bugzilla->params->{useclassification}) if (Bugzilla->get_field('classification')->enabled)
{ {
my $classification = ref $classification_name my $classification = ref $classification_name
? $classification_name ? $classification_name
@ -612,7 +612,7 @@ sub _check_default_milestone
return undef unless ref $invocant; return undef unless ref $invocant;
# Do nothing if target milestones are not in use # Do nothing if target milestones are not in use
return $invocant->default_milestone unless Bugzilla->params->{usetargetmilestone}; return $invocant->default_milestone if !Bugzilla->get_field('target_milestone')->enabled;
$milestone = trim($milestone) || undef; $milestone = trim($milestone) || undef;
if ($milestone) if ($milestone)

View File

@ -1438,7 +1438,7 @@ sub init
# does index merge on such conditions # does index merge on such conditions
term => '(bugs.reporter_accessible = 1 AND bugs.reporter='.$user->id. term => '(bugs.reporter_accessible = 1 AND bugs.reporter='.$user->id.
' OR bugs.assigned_to='.$user->id. ' OR bugs.assigned_to='.$user->id.
(Bugzilla->params->{useqacontact} ? ' OR bugs.qa_contact='.$user->id : '').')' (Bugzilla->get_field('qa_contact')->enabled ? ' OR bugs.qa_contact='.$user->id : '').')'
}) : ()) ] }) : ()) ]
]; ];
} }

View File

@ -47,6 +47,7 @@ use Bugzilla::User;
use Bugzilla::Error; use Bugzilla::Error;
use Bugzilla::Status; use Bugzilla::Status;
use Bugzilla::Token; use Bugzilla::Token;
use Bugzilla::Template::Plugin::Bugzilla;
use Cwd qw(abs_path); use Cwd qw(abs_path);
use MIME::Base64; use MIME::Base64;
@ -466,7 +467,7 @@ sub get_bug_link
if ($cansee) if ($cansee)
{ {
$title .= '/' . $bug->component . ' - ' . $bug->short_desc; $title .= '/' . $bug->component . ' - ' . $bug->short_desc;
if (Bugzilla->params->{usebugaliases} && $options->{use_alias} && $link_text =~ /^\d+$/ && $bug->alias) if (!Bugzilla->get_field('alias')->obsolete && $options->{use_alias} && $link_text =~ /^\d+$/ && $bug->alias)
{ {
$link_text = $bug->alias; $link_text = $bug->alias;
} }
@ -883,6 +884,7 @@ sub create {
terms => Bugzilla->messages->{terms}, terms => Bugzilla->messages->{terms},
field_descs => Bugzilla->messages->{field_descs}, field_descs => Bugzilla->messages->{field_descs},
lc_messages => Bugzilla->messages, lc_messages => Bugzilla->messages,
Bugzilla => Bugzilla::Template::Plugin::Bugzilla->new,
# HTML <select> # HTML <select>
# html_select(name, { <attr> => <value> }, <selected value>, ( # html_select(name, { <attr> => <value> }, <selected value>, (

View File

@ -704,7 +704,7 @@ sub can_edit_bug
return undef if !$bug; return undef if !$bug;
} }
return 1 if $bug->assigned_to_id && $bug->assigned_to_id == $self->id || return 1 if $bug->assigned_to_id && $bug->assigned_to_id == $self->id ||
Bugzilla->params->{useqacontact} && $bug->qa_contact_id && $bug->qa_contact_id == $self->id || Bugzilla->get_field('qa_contact')->enabled && $bug->qa_contact_id && $bug->qa_contact_id == $self->id ||
$bug->reporter_accessible && $bug->reporter_id && $bug->reporter_id == $self->id || $bug->reporter_accessible && $bug->reporter_id && $bug->reporter_id == $self->id ||
$bug->cclist_accessible && grep($_->id == $self->id, @{$bug->cc_users}) || $bug->cclist_accessible && grep($_->id == $self->id, @{$bug->cc_users}) ||
$self->can_edit_product($bug->product_id); $self->can_edit_product($bug->product_id);
@ -760,7 +760,7 @@ sub visible_bugs {
} }
$sth->execute(@check_ids); $sth->execute(@check_ids);
my $use_qa_contact = Bugzilla->params->{'useqacontact'}; my $use_qa_contact = Bugzilla->get_field('qa_contact')->enabled;
while (my $row = $sth->fetchrow_arrayref) { while (my $row = $sth->fetchrow_arrayref) {
my ($bug_id, $reporter, $owner, $qacontact, $reporter_access, my ($bug_id, $reporter, $owner, $qacontact, $reporter_access,
$cclist_access, $isoncclist, $missinggroup) = @$row; $cclist_access, $isoncclist, $missinggroup) = @$row;

View File

@ -375,9 +375,9 @@ sub history {
$item{history} = \@history; $item{history} = \@history;
# alias is returned in case users passes a mixture of ids and aliases # alias is returned in case users passes a mixture of ids and aliases
# then they get to know which bug activity relates to which value # then they get to know which bug activity relates to which value
# they passed # they passed
if (Bugzilla->params->{'usebugaliases'}) { if (!Bugzilla->get_field('alias')->obsolete) {
$item{alias} = $self->type('string', $bug->alias); $item{alias} = $self->type('string', $bug->alias);
} }
else { else {
@ -517,7 +517,7 @@ sub update {
# alias is returned in case users pass a mixture of ids and aliases, # alias is returned in case users pass a mixture of ids and aliases,
# so that they can know which set of changes relates to which value # so that they can know which set of changes relates to which value
# they passed. # they passed.
if (Bugzilla->params->{'usebugaliases'}) { if (Bugzilla->get_field('alias')->enabled) {
$hash{alias} = $self->type('string', $bug->alias); $hash{alias} = $self->type('string', $bug->alias);
} }
else { else {
@ -811,14 +811,12 @@ sub _bug_to_hash {
whiteboard => $self->type('string', $bug->status_whiteboard), whiteboard => $self->type('string', $bug->status_whiteboard),
); );
# FIXME change toggle method to fielddefs.is_obsolete if (Bugzilla->get_field('op_sys')->enabled && filter_wants $params, 'op_sys')
if (Bugzilla->params->{useopsys} && filter_wants $params, 'op_sys')
{ {
$item{op_sys} = $self->type('string', $bug->op_sys && $bug->op_sys_obj->name); $item{op_sys} = $self->type('string', $bug->op_sys && $bug->op_sys_obj->name);
} }
# FIXME change toggle method to fielddefs.is_obsolete if (Bugzilla->get_field('rep_platform')->enabled && filter_wants $params, 'platform')
if (Bugzilla->params->{useplatform} && filter_wants $params, 'platform')
{ {
$item{platform} = $self->type('string', $bug->rep_platform && $bug->rep_platform_obj->name); $item{platform} = $self->type('string', $bug->rep_platform && $bug->rep_platform_obj->name);
} }
@ -860,7 +858,7 @@ sub _bug_to_hash {
@{ $bug->keywords_obj }; @{ $bug->keywords_obj };
$item{'keywords'} = \@keywords; $item{'keywords'} = \@keywords;
} }
if (Bugzilla->params->{useqacontact} && if (Bugzilla->get_field('qa_contact')->enabled &&
filter_wants $params, 'qa_contact') { filter_wants $params, 'qa_contact') {
my $qa_login = $bug->qa_contact ? $bug->qa_contact->login : ''; my $qa_login = $bug->qa_contact ? $bug->qa_contact->login : '';
$item{'qa_contact'} = $self->type('string', $qa_login); $item{'qa_contact'} = $self->type('string', $qa_login);

View File

@ -55,7 +55,7 @@ sub get_accessible_products {
sub get_products_by_classification sub get_products_by_classification
{ {
my ($self, $params) = @_; my ($self, $params) = @_;
if (!Bugzilla->params->{useclassification}) if (!Bugzilla->get_field('classification')->enabled)
{ {
return {status => 'classification_is_off'}; return {status => 'classification_is_off'};
} }

View File

@ -661,7 +661,7 @@ if ($format->{extension} eq 'atom')
'component', 'component',
'resolution' 'resolution'
); );
push(@required_atom_columns, 'target_milestone') if Bugzilla->params->{usetargetmilestone}; push(@required_atom_columns, 'target_milestone') if Bugzilla->get_field('target_milestone')->enabled;
foreach my $required (@required_atom_columns) foreach my $required (@required_atom_columns)
{ {

View File

@ -57,8 +57,8 @@ Bugzilla->switch_to_shadow_db;
my $vars = {}; my $vars = {};
$vars->{'priority'} = Bugzilla->get_field('priority')->legal_value_names; $vars->{'priority'} = Bugzilla->get_field('priority')->legal_value_names;
$vars->{'severity'} = Bugzilla->get_field('bug_severity')->legal_value_names; $vars->{'severity'} = Bugzilla->get_field('bug_severity')->legal_value_names;
$vars->{'platform'} = Bugzilla->get_field('rep_platform')->legal_value_names if Bugzilla->params->{useplatform}; $vars->{'platform'} = Bugzilla->get_field('rep_platform')->legal_value_names if Bugzilla->get_field('rep_platform')->enabled;
$vars->{'op_sys'} = Bugzilla->get_field('op_sys')->legal_value_names if Bugzilla->params->{useopsys}; $vars->{'op_sys'} = Bugzilla->get_field('op_sys')->legal_value_names if Bugzilla->get_field('op_sys')->enabled;
$vars->{'keyword'} = [map($_->name, Bugzilla::Keyword->get_all)]; $vars->{'keyword'} = [map($_->name, Bugzilla::Keyword->get_all)];
$vars->{'resolution'} = Bugzilla->get_field('resolution')->legal_value_names; $vars->{'resolution'} = Bugzilla->get_field('resolution')->legal_value_names;
$vars->{'status'} = Bugzilla->get_field('bug_status')->legal_value_names; $vars->{'status'} = Bugzilla->get_field('bug_status')->legal_value_names;

View File

@ -27,7 +27,7 @@ unless ($product && $user->can_access_product($product->name))
{ {
ThrowUserError('no_products'); ThrowUserError('no_products');
} }
if (Bugzilla->params->{useclassification} && $ARGS->{classification} ne '__all') if (Bugzilla->get_field('classification')->enabled && $ARGS->{classification} ne '__all')
{ {
my $cl = Bugzilla::Classification->new({ name => trim($ARGS->{classification} || '') }); my $cl = Bugzilla::Classification->new({ name => trim($ARGS->{classification} || '') });
if (!$cl) if (!$cl)

View File

@ -64,8 +64,8 @@ Bugzilla->user->in_group('editclassifications')
action => "edit", action => "edit",
object => "classifications"}); object => "classifications"});
ThrowUserError("auth_classification_not_enabled") ThrowUserError("auth_classification_not_enabled")
unless Bugzilla->params->{"useclassification"}; unless Bugzilla->get_field('classification')->enabled;
# #
# often used variables # often used variables

View File

@ -108,22 +108,43 @@ elsif ($action eq 'update')
$field->set_description(scalar $cgi->param('desc')); $field->set_description(scalar $cgi->param('desc'));
$field->set_sortkey(scalar $cgi->param('sortkey')); $field->set_sortkey(scalar $cgi->param('sortkey'));
$field->set_in_new_bugmail(scalar $cgi->param('new_bugmail'));
$field->set_obsolete(scalar $cgi->param('obsolete'));
$field->set_is_mandatory(!scalar $cgi->param('nullable'));
$field->set_url(scalar $cgi->param('url')); $field->set_url(scalar $cgi->param('url'));
$field->set_default_value($field->type == FIELD_TYPE_MULTI_SELECT ? [ $cgi->param('default_value') ] : scalar $cgi->param('default_value')); $field->set_add_to_deps($cgi->param('add_to_deps'));
$field->set_clone_bug(scalar $cgi->param('clone_bug')); if ($field->can_tweak('mailhead'))
if ($field->custom) {
$field->set_in_new_bugmail(scalar $cgi->param('new_bugmail'));
}
if ($field->can_tweak('obsolete'))
{
$field->set_obsolete(scalar $cgi->param('obsolete'));
}
if ($field->can_tweak('nullable'))
{
$field->set_is_mandatory(!scalar $cgi->param('nullable'));
}
if ($field->can_tweak('default_value'))
{
$field->set_default_value($field->type == FIELD_TYPE_MULTI_SELECT ? [ $cgi->param('default_value') ] : scalar $cgi->param('default_value'));
}
if ($field->can_tweak('clone_bug'))
{
$field->set_clone_bug(scalar $cgi->param('clone_bug'));
}
if ($field->can_tweak('value_field_id'))
{
$field->set_value_field(scalar $cgi->param('value_field_id'));
}
if ($field->can_tweak('default_field_id'))
{ {
$field->set_value_field($cgi->param('value_field_id'));
$field->set_default_field($cgi->param('default_field_id')); $field->set_default_field($cgi->param('default_field_id'));
$field->set_add_to_deps($cgi->param('add_to_deps')); }
for ( for (
[ qw(visibility_field_id set_visibility_field set_visibility_values visibility_value_id) ], [ qw(visibility_field_id set_visibility_field set_visibility_values visibility_value_id) ],
[ qw(null_field_id set_null_field set_null_visibility_values null_visibility_values) ], [ qw(null_field_id set_null_field set_null_visibility_values null_visibility_values) ],
[ qw(clone_field_id set_clone_field set_clone_visibility_values clone_visibility_values) ], [ qw(clone_field_id set_clone_field set_clone_visibility_values clone_visibility_values) ],
) { ) {
if ($field->can_tweak($_->[0]))
{
my $vf = $cgi->param($_->[0]); my $vf = $cgi->param($_->[0]);
if ($vf ne $field->${\$_->[0]}()) if ($vf ne $field->${\$_->[0]}())
{ {

View File

@ -66,14 +66,14 @@ my $classification_name = trim($cgi->param('classification') || '');
my $product_name = trim($cgi->param('product') || ''); my $product_name = trim($cgi->param('product') || '');
my $action = trim($cgi->param('action') || ''); my $action = trim($cgi->param('action') || '');
my $token = $cgi->param('token'); my $token = $cgi->param('token');
my $useclassification = Bugzilla->get_field('classification')->enabled;
# #
# product = '' -> Show nice list of classifications (if # product = '' -> Show nice list of classifications (if
# classifications enabled) # classifications enabled)
# #
if (Bugzilla->params->{useclassification} if ($useclassification && !$classification_name && !$product_name)
&& !$classification_name && !$product_name)
{ {
my $class; my $class;
if ($user->in_group('editcomponents')) if ($user->in_group('editcomponents'))
@ -105,7 +105,7 @@ if (!$action && !$product_name)
my $classification; my $classification;
my $products; my $products;
if (Bugzilla->params->{useclassification}) if ($useclassification)
{ {
$classification = Bugzilla::Classification->check($classification_name); $classification = Bugzilla::Classification->check($classification_name);
$products = $user->get_editable_products($classification->id); $products = $user->get_editable_products($classification->id);
@ -140,7 +140,7 @@ if ($action eq 'add')
object => 'products', object => 'products',
}); });
if (Bugzilla->params->{useclassification}) if ($useclassification)
{ {
my $classification = Bugzilla::Classification->check($classification_name); my $classification = Bugzilla::Classification->check($classification_name);
$vars->{classification} = $classification; $vars->{classification} = $classification;
@ -184,7 +184,7 @@ if ($action eq 'new')
extproduct => scalar $cgi->param('extproduct'), extproduct => scalar $cgi->param('extproduct'),
cc_group => scalar($cgi->param('cc_group')) || '', cc_group => scalar($cgi->param('cc_group')) || '',
); );
if (Bugzilla->params->{usevotes}) if (Bugzilla->get_field('votes')->enabled)
{ {
$create_params{votesperuser} = $cgi->param('votesperuser'); $create_params{votesperuser} = $cgi->param('votesperuser');
$create_params{maxvotesperbug} = $cgi->param('maxvotesperbug'); $create_params{maxvotesperbug} = $cgi->param('maxvotesperbug');
@ -196,7 +196,7 @@ if ($action eq 'new')
$vars->{message} = 'product_created'; $vars->{message} = 'product_created';
$vars->{product} = $product; $vars->{product} = $product;
if (Bugzilla->params->{useclassification}) if ($useclassification)
{ {
$vars->{classification} = new Bugzilla::Classification($product->classification_id); $vars->{classification} = new Bugzilla::Classification($product->classification_id);
} }
@ -217,7 +217,7 @@ if ($action eq 'del')
{ {
my $product = $user->check_can_admin_product($product_name); my $product = $user->check_can_admin_product($product_name);
if (Bugzilla->params->{useclassification}) if ($useclassification)
{ {
$vars->{classification} = new Bugzilla::Classification($product->classification_id); $vars->{classification} = new Bugzilla::Classification($product->classification_id);
} }
@ -247,7 +247,7 @@ if ($action eq 'delete')
$vars->{product} = $product; $vars->{product} = $product;
$vars->{no_edit_product_link} = 1; $vars->{no_edit_product_link} = 1;
if (Bugzilla->params->{useclassification}) if ($useclassification)
{ {
$vars->{classifications} = $user->in_group('editcomponents') ? $vars->{classifications} = $user->in_group('editcomponents') ?
[Bugzilla::Classification->get_all] : $user->get_selectable_classifications; [Bugzilla::Classification->get_all] : $user->get_selectable_classifications;
@ -276,7 +276,7 @@ if ($action eq 'edit' || (!$action && $product_name))
{ {
my $product = $user->check_can_admin_product($product_name); my $product = $user->check_can_admin_product($product_name);
if (Bugzilla->params->{useclassification}) if ($useclassification)
{ {
$vars->{classification} = $product->classification_obj; $vars->{classification} = $product->classification_obj;
$vars->{classifications} = [ Bugzilla::Classification->get_all ]; $vars->{classifications} = [ Bugzilla::Classification->get_all ];
@ -299,7 +299,7 @@ if ($action eq 'update')
my $product_old_name = trim($cgi->param('product_old_name') || ''); my $product_old_name = trim($cgi->param('product_old_name') || '');
my $product = $user->check_can_admin_product($product_old_name); my $product = $user->check_can_admin_product($product_old_name);
if (Bugzilla->params->{useclassification}) if ($useclassification)
{ {
$vars->{old_classification} = $product->classification_obj; $vars->{old_classification} = $product->classification_obj;
$product->set_classification(scalar $cgi->param('classification')); $product->set_classification(scalar $cgi->param('classification'));
@ -312,7 +312,7 @@ if ($action eq 'update')
$product->set_description(scalar $cgi->param('description')); $product->set_description(scalar $cgi->param('description'));
$product->set_default_milestone(scalar $cgi->param('defaultmilestone')); $product->set_default_milestone(scalar $cgi->param('defaultmilestone'));
$product->set_is_active(scalar $cgi->param('is_active')); $product->set_is_active(scalar $cgi->param('is_active'));
if (Bugzilla->params->{usevotes}) if (Bugzilla->get_field('votes')->enabled)
{ {
$product->set_votes_per_user(scalar $cgi->param('votesperuser')); $product->set_votes_per_user(scalar $cgi->param('votesperuser'));
$product->set_votes_per_bug(scalar $cgi->param('maxvotesperbug')); $product->set_votes_per_bug(scalar $cgi->param('maxvotesperbug'));
@ -326,7 +326,7 @@ if ($action eq 'update')
delete_token($token); delete_token($token);
if (Bugzilla->params->{useclassification}) if ($useclassification)
{ {
$vars->{classification} = $product->classification_obj; $vars->{classification} = $product->classification_obj;
} }

View File

@ -81,7 +81,7 @@ if ($product_name eq '')
my @enterable_products = @{$user->get_enterable_products}; my @enterable_products = @{$user->get_enterable_products};
ThrowUserError('no_products') unless scalar(@enterable_products); ThrowUserError('no_products') unless scalar(@enterable_products);
my $classification = Bugzilla->params->{useclassification} ? $ARGS->{classification} : '__all'; my $classification = Bugzilla->get_field('classification')->enabled ? $ARGS->{classification} : '__all';
# Unless a real classification name is given, we sort products # Unless a real classification name is given, we sort products
# by classification. # by classification.
@ -89,7 +89,7 @@ if ($product_name eq '')
unless ($classification && $classification ne '__all') unless ($classification && $classification ne '__all')
{ {
if (Bugzilla->params->{useclassification}) if (Bugzilla->get_field('classification')->enabled)
{ {
my $class; my $class;
# Get all classifications with at least one enterable product. # Get all classifications with at least one enterable product.
@ -405,8 +405,8 @@ else
$default{component_} = $ARGS->{component}; $default{component_} = $ARGS->{component};
$default{priority} = $ARGS->{priority} || Bugzilla->params->{defaultpriority}; $default{priority} = $ARGS->{priority} || Bugzilla->params->{defaultpriority};
$default{bug_severity} = $ARGS->{bug_severity} || Bugzilla->params->{defaultseverity}; $default{bug_severity} = $ARGS->{bug_severity} || Bugzilla->params->{defaultseverity};
$default{rep_platform} = pick_by_ua($ARGS, 'rep_platform') if Bugzilla->params->{useplatform}; $default{rep_platform} = pick_by_ua($ARGS, 'rep_platform') if Bugzilla->get_field('rep_platform')->enabled;
$default{op_sys} = pick_by_ua($ARGS, 'op_sys') if Bugzilla->params->{useopsys}; $default{op_sys} = pick_by_ua($ARGS, 'op_sys') if Bugzilla->get_field('op_sys')->enabled;
$default{alias} = $ARGS->{alias}; $default{alias} = $ARGS->{alias};
$default{short_desc} = $ARGS->{short_desc}; $default{short_desc} = $ARGS->{short_desc};
@ -455,7 +455,7 @@ elsif (defined $vercookie && grep { $_ eq $vercookie } @{$vars->{version}})
} }
# Get list of milestones. # Get list of milestones.
if (Bugzilla->params->{usetargetmilestone}) if (Bugzilla->get_field('target_milestone')->enabled)
{ {
if ($ARGS->{target_milestone}) if ($ARGS->{target_milestone})
{ {

View File

@ -54,9 +54,6 @@ my $upload;
my $name_tr = {}; my $name_tr = {};
my $bug_tpl = {}; my $bug_tpl = {};
$bug_tpl->{platform} = Bugzilla->params->{defaultplatform}
if Bugzilla->params->{defaultplatform} && Bugzilla->params->{useplatform};
for (keys %$ARGS) for (keys %$ARGS)
{ {
if (/^f_/so && $ARGS->{$_}) if (/^f_/so && $ARGS->{$_})

View File

@ -706,7 +706,7 @@ sub process_bug {
} }
# Milestone # Milestone
if ( $params->{"usetargetmilestone"} ) { if (Bugzilla->get_field('target_milestone')->enabled) {
my $milestone; my $milestone;
if (defined $bug_fields{'target_milestone'} if (defined $bug_fields{'target_milestone'}
&& $bug_fields{'target_milestone'} ne "") { && $bug_fields{'target_milestone'} ne "") {
@ -878,7 +878,7 @@ sub process_bug {
} }
} }
if ( $params->{"useqacontact"} ) { if (Bugzilla->get_field('qa_contact')->enabled) {
my $qa_contact; my $qa_contact;
push( @query, "qa_contact" ); push( @query, "qa_contact" );
if ( ( defined $bug_fields{'qa_contact'}) if ( ( defined $bug_fields{'qa_contact'})

View File

@ -135,8 +135,8 @@ my @bug_fields = qw(
cc cc
); );
# FIXME kill op_sys and rep_platform completely, make them custom fields # FIXME kill op_sys and rep_platform completely, make them custom fields
push @bug_fields, 'op_sys' if Bugzilla->params->{useopsys}; push @bug_fields, 'op_sys' if Bugzilla->get_field('op_sys')->enabled;
push @bug_fields, 'rep_platform' if Bugzilla->params->{useplatform}; push @bug_fields, 'rep_platform' if Bugzilla->get_field('rep_platform')->enabled;
# Include custom fields. # Include custom fields.
push @bug_fields, map { $_->name } Bugzilla->active_custom_fields; push @bug_fields, map { $_->name } Bugzilla->active_custom_fields;

View File

@ -427,7 +427,7 @@ if ($ARGS->{id})
{ {
# Since aliases are unique (like bug numbers), they can only be changed # Since aliases are unique (like bug numbers), they can only be changed
# for one bug at a time. # for one bug at a time.
if (Bugzilla->params->{usebugaliases} && defined $ARGS->{alias}) if (defined $ARGS->{alias})
{ {
$first_bug->set(alias => $ARGS->{alias}); $first_bug->set(alias => $ARGS->{alias});
} }

View File

@ -31,7 +31,6 @@ use Bugzilla::Version;
use Bugzilla::Constants; use Bugzilla::Constants;
use Bugzilla::Config qw(:admin); use Bugzilla::Config qw(:admin);
my $dbh = Bugzilla->dbh; my $dbh = Bugzilla->dbh;
# set Bugzilla usage mode to USAGE_MODE_CMDLINE # set Bugzilla usage mode to USAGE_MODE_CMDLINE
@ -44,13 +43,13 @@ Bugzilla->usage_mode(USAGE_MODE_CMDLINE);
my $params_modified = 0; my $params_modified = 0;
# Some parameters must be turned on to create bugs requiring them. # Some parameters must be turned on to create bugs requiring them.
# They are also expected to be turned on by some webservice_*.t scripts. # They are also expected to be turned on by some webservice_*.t scripts.
if (!Bugzilla->params->{usebugaliases}) { for (qw(alias qa_contact))
SetParam('usebugaliases', 1); {
$params_modified = 1; if ((my $f = Bugzilla->get_field($_))->obsolete)
} {
if (!Bugzilla->params->{useqacontact}) { $f->set_obsolete(0);
SetParam('useqacontact', 1); $f->update;
$params_modified = 1; }
} }
# Do not try to send emails for real! # Do not try to send emails for real!
if (Bugzilla->params->{mail_delivery_method} ne 'Test') { if (Bugzilla->params->{mail_delivery_method} ne 'Test') {

View File

@ -269,7 +269,7 @@ $vars->{freetext_fields} = [
Bugzilla->get_field('longdesc'), Bugzilla->get_field('longdesc'),
Bugzilla->get_field('bug_file_loc') Bugzilla->get_field('bug_file_loc')
]; ];
if (Bugzilla->params->{usestatuswhiteboard}) if (Bugzilla->get_field('status_whiteboard')->enabled)
{ {
push @{$vars->{freetext_fields}}, Bugzilla->get_field('status_whiteboard'); push @{$vars->{freetext_fields}}, Bugzilla->get_field('status_whiteboard');
} }

View File

@ -149,7 +149,7 @@ sub queue {
(ccmap.who IS NOT NULL AND cclist_accessible = 1) OR (ccmap.who IS NOT NULL AND cclist_accessible = 1) OR
(bugs.reporter = $userid AND bugs.reporter_accessible = 1) OR (bugs.reporter = $userid AND bugs.reporter_accessible = 1) OR
(bugs.assigned_to = $userid) " . (bugs.assigned_to = $userid) " .
(Bugzilla->params->{'useqacontact'} ? "OR (Bugzilla->get_field('qa_contact')->enabled ? "OR
(bugs.qa_contact = $userid))" : ")"); (bugs.qa_contact = $userid))" : ")");
unless ($user->is_insider) { unless ($user->is_insider) {

View File

@ -11,8 +11,6 @@
[% target = "index.cgi" %] [% target = "index.cgi" %]
[% END %] [% END %]
[% USE Bugzilla %]
<html> <html>
<head> <head>
<title>Log in to [% terms.Bugzilla %]</title> <title>Log in to [% terms.Bugzilla %]</title>

View File

@ -26,14 +26,12 @@
[% IF !target %] [% IF !target %]
[% target = "index.cgi" %] [% target = "index.cgi" %]
[% END %] [% END %]
[% PROCESS global/header.html.tmpl [% PROCESS global/header.html.tmpl
title = "Log in to $terms.Bugzilla", title = "Log in to $terms.Bugzilla",
onload = "document.forms['login'].Bugzilla_login.focus()" onload = "document.forms['login'].Bugzilla_login.focus()"
%] %]
[% USE Bugzilla %]
<p> <p>
I need a legitimate login and password to continue. I need a legitimate login and password to continue.
</p> </p>

View File

@ -33,8 +33,8 @@
# receiving mail for that reason when in that role. # receiving mail for that reason when in that role.
#%] #%]
[% useqacontact = Param('useqacontact') %] [% useqacontact = Bugzilla.get_field('qa_contact').enabled %]
[% usevotes = Param('usevotes') %] [% usevotes = Bugzilla.get_field('votes').enabled %]
<p> <p>
If you don't like getting a notification for "trivial" If you don't like getting a notification for "trivial"

View File

@ -59,14 +59,13 @@
<dd class="[% class %]">Create new user accounts or edit existing ones. You can <dd class="[% class %]">Create new user accounts or edit existing ones. You can
also add and remove users from groups (also known as "user privileges").</dd> also add and remove users from groups (also known as "user privileges").</dd>
[% class = (Param('useclassification') && user.in_group('editclassifications')) ? "" : "forbidden" %] [% class = (Bugzilla.get_field('classification').enabled && user.in_group('editclassifications')) ? "" : "forbidden" %]
<dt id="classifications" class="[% class %]"><a href="editclassifications.cgi">Classifications</a></dt> <dt id="classifications" class="[% class %]"><a href="editclassifications.cgi">Classifications</a></dt>
<dd class="[% class %]">If your installation has to manage many products at once, <dd class="[% class %]">If your installation has to manage many products at once,
it's a good idea to group these products into distinct categories. This lets users it's a good idea to group these products into distinct categories. This lets users
find information more easily when doing searches or when filing new [% terms.bugs %].</dd> find information more easily when doing searches or when filing new [% terms.bugs %].</dd>
[% class = (user.in_group('editcomponents') [% class = (user.in_group('editcomponents') || user.get_products_by_permission("editcomponents").size) ? "" : "forbidden" %]
|| user.get_products_by_permission("editcomponents").size) ? "" : "forbidden" %]
<dt id="products" class="[% class %]"><a href="editproducts.cgi">Products</a></dt> <dt id="products" class="[% class %]"><a href="editproducts.cgi">Products</a></dt>
<dd class="[% class %]">Edit all aspects of products, including group restrictions <dd class="[% class %]">Edit all aspects of products, including group restrictions
which let you define who can access [% terms.bugs %] being in these products. You which let you define who can access [% terms.bugs %] being in these products. You

View File

@ -49,14 +49,14 @@ from '[% product.name FILTER html %]' product
<tr> <tr>
<td valign="top">Default assignee:</td> <td valign="top">Default assignee:</td>
<td valign="top">[% comp.default_assignee.login FILTER html %]</td> <td valign="top">[% comp.default_assignee.login FILTER html %]</td>
[% IF Param('useqacontact') %] [% IF Bugzilla.get_field('qa_contact').enabled %]
</tr> </tr>
<tr> <tr>
<td valign="top">Default QA contact:</td> <td valign="top">Default QA contact:</td>
<td valign="top">[% comp.default_qa_contact.login FILTER html %]</td> <td valign="top">[% comp.default_qa_contact.login FILTER html %]</td>
[% END %] [% END %]
</tr> </tr>
<tr> <tr>
<td valign="top">Component of Product:</td> <td valign="top">Component of Product:</td>

View File

@ -68,7 +68,7 @@
%] %]
</td> </td>
[% IF Param('useqacontact') %] [% IF Bugzilla.get_field('qa_contact').enabled %]
</tr> </tr>
<tr> <tr>
<th align="left"><label for="initialqacontact">Default QA contact:</label></th> <th align="left"><label for="initialqacontact">Default QA contact:</label></th>

View File

@ -70,7 +70,7 @@
] ]
%] %]
[% IF Param('useqacontact') %] [% IF Bugzilla.get_field('qa_contact').enabled %]
[% columns.push({ [% columns.push({
name => 'initialqacontact' name => 'initialqacontact'

View File

@ -61,6 +61,34 @@ var constants = {
</ul> </ul>
[% END %] [% END %]
[% IF field.id && !field.custom %]
[% SWITCH field.name %]
[% CASE 'classification' %]
<p>
If this field is enabled, [% terms.Bugzilla %] will associate each product with a
specific classification.<br /> But you must have 'editclassification'
permissions enabled in order to edit classifications.
</p>
[% CASE 'votes' %]
<p>
If this field is enabled, users will be allowed to vote for [% terms.bugs %].
Note that in order for this to be effective, you will have to change the maximum
votes allowed in a product to be non-zero in <a href="editproducts.cgi">the product edit page</a>.
</p>
[% CASE 'alias' %]
<p>
Enabling this field allows you to assign [% terms.bugs %] "aliases", which are
easy-to-remember names by which you can refer to [% terms.bugs %].
</p>
[% CASE 'see_also' %]
<p>
Enabling See Also field allows you to refer to [% terms.bugs %] in other installations.
Even if you disable this field, [% terms.bug %] relationships (URLs) which are already set
will still appear and can be removed.
</p>
[% END %]
[% END %]
<form id="edit_field" action="editfields.cgi" method="GET"> <form id="edit_field" action="editfields.cgi" method="GET">
<table border="0" cellspacing="0" cellpadding="5"> <table border="0" cellspacing="0" cellpadding="5">
<tr> <tr>
@ -72,17 +100,20 @@ var constants = {
<input type="text" id="name" name="name" value="cf_" size="40" maxlength="64" /> <input type="text" id="name" name="name" value="cf_" size="40" maxlength="64" />
[% END %] [% END %]
</td> </td>
[% IF !field.id || field.can_tweak('mailhead') %]
<th align="left"> <th align="left">
<label for="new_bugmail">Displayed in [% terms.bug %]mail for new [% terms.bugs %]:</label> <label for="new_bugmail">Displayed in [% terms.bug %]mail for new [% terms.bugs %]:</label>
</th> </th>
<td><input type="checkbox" id="new_bugmail" name="new_bugmail" value="1" [%- " checked" IF field.mailhead %] /></td> <td><input type="checkbox" id="new_bugmail" name="new_bugmail" value="1" [%- " checked" IF field.in_new_bugmail %] /></td>
[% END %]
</tr> </tr>
<tr> <tr>
<th align="left"><label for="desc">Title:</label></th> <th align="left"><label for="desc">Title:</label></th>
<td><input type="text" id="desc" name="desc" style="width: 400px" value="[% field.description | html %]" /></td> <td><input type="text" id="desc" name="desc" style="width: 400px" value="[% field.description | html %]" /></td>
[% IF !field.id || field.can_tweak('clone_bug') %]
<th align="left"><label for="clone_bug">Is copied into the cloned [% terms.bug %]:</label></th> <th align="left"><label for="clone_bug">Is copied into the cloned [% terms.bug %]:</label></th>
<td><input type="checkbox" id="clone_bug" name="clone_bug" value="1" [%- " checked" IF field.clone_bug %] onclick="onChangeCloned()" /></td> <td><input type="checkbox" id="clone_bug" name="clone_bug" value="1" [%- " checked" IF field.clone_bug %] onclick="onChangeCloned()" /></td>
[% END %]
</tr> </tr>
<tr> <tr>
<th align="left"><label for="sortkey">Sortkey:</label></th> <th align="left"><label for="sortkey">Sortkey:</label></th>
@ -90,11 +121,13 @@ var constants = {
<input type="text" id="sortkey" name="sortkey" size="6" <input type="text" id="sortkey" name="sortkey" size="6"
maxlength="6" value="[% field.sortkey | html %]" /> maxlength="6" value="[% field.sortkey | html %]" />
</td> </td>
<th align="left"><label for="obsolete">Is obsolete:</label></th> [% IF !field.id || field.can_tweak('obsolete') %]
<th align="left"><label for="obsolete">Is disabled:</label></th>
<td> <td>
<input type="checkbox" id="obsolete" name="obsolete" value="1" <input type="checkbox" id="obsolete" name="obsolete" value="1"
[%- " checked" IF field.obsolete %] /> [%- " checked" IF field.obsolete %] />
</td> </td>
[% END %]
</tr> </tr>
<tr> <tr>
<th align="left">Type:</th> <th align="left">Type:</th>
@ -113,7 +146,7 @@ var constants = {
</select> </select>
[% END %] [% END %]
</td> </td>
[% IF !field.id || field.type && field.type != constants.FIELD_TYPE_BUG_ID_REV %] [% IF !field.id || field.can_tweak('default_value') %]
<th align="left" id="default_value_th">Default value:</th> <th align="left" id="default_value_th">Default value:</th>
<td id="default_value_td"> <td id="default_value_td">
[% IF field.is_select %] [% IF field.is_select %]
@ -146,7 +179,7 @@ var constants = {
[% ELSE %] [% ELSE %]
<td colspan="2"></td> <td colspan="2"></td>
[% END %] [% END %]
[% IF !field.id || field.type && field.type != constants.FIELD_TYPE_BUG_ID_REV %] [% IF !field.id || field.can_tweak('nullable') %]
<th align="left"><label for="nullable">Allow empty value:</label></th> <th align="left"><label for="nullable">Allow empty value:</label></th>
<td> <td>
<input type="checkbox" id="nullable" name="nullable" onclick="onChangeNullable()" <input type="checkbox" id="nullable" name="nullable" onclick="onChangeNullable()"
@ -170,7 +203,7 @@ var constants = {
</tr> </tr>
[% END %] [% END %]
[% IF field.custom || !field.id %] [% IF !field.id || field.can_tweak('visibility_field_id') %]
<tr valign="top"> <tr valign="top">
<th align="left" colspan="2"><label for="visibility_field_id"> <th align="left" colspan="2"><label for="visibility_field_id">
Show/hide the field depending on the value of: Show/hide the field depending on the value of:
@ -191,7 +224,8 @@ var constants = {
</select> </select>
</td> </td>
</tr> </tr>
[% IF !field.id || field.type && field.type != constants.FIELD_TYPE_BUG_ID_REV %] [% END %]
[% IF !field.id || field.can_tweak('null_field_id') %]
<tr valign="top" id="null_field_id_row"> <tr valign="top" id="null_field_id_row">
<th align="left" colspan="2"><label for="null_field_id"> <th align="left" colspan="2"><label for="null_field_id">
Allow empty value depending on the value of: Allow empty value depending on the value of:
@ -212,6 +246,8 @@ var constants = {
</select> </select>
</td> </td>
</tr> </tr>
[% END %]
[% IF !field.id || field.can_tweak('clone_field_id') %]
<tr valign="top" id="clone_field_id_row"> <tr valign="top" id="clone_field_id_row">
<th align="left" colspan="2"><label for="clone_field_id"> <th align="left" colspan="2"><label for="clone_field_id">
Clone field depending on the value of: Clone field depending on the value of:
@ -232,6 +268,8 @@ var constants = {
</select> </select>
</td> </td>
</tr> </tr>
[% END %]
[% IF !field.id || field.can_tweak('default_field_id') %]
<tr valign="top"> <tr valign="top">
<th align="left" colspan="2"><label for="default_field_id"> <th align="left" colspan="2"><label for="default_field_id">
Make default value dependent on the value of: Make default value dependent on the value of:
@ -253,10 +291,7 @@ var constants = {
</td> </td>
</tr> </tr>
[% END %] [% END %]
[% END %] [% IF !field.id || field.can_tweak('value_field_id') %]
[%# FIXME These fields are still handled differently... %]
[% IF field.name != 'version' && field.name != 'target_milestone' &&
field.name != 'component' && field.is_select || !field.id %]
<tr valign="top" id="value_field_row"> <tr valign="top" id="value_field_row">
<th colspan="2" align="left"><label for="value_field_id"> <th colspan="2" align="left"><label for="value_field_id">
Field that controls the values that appear in this field: Field that controls the values that appear in this field:
@ -276,7 +311,7 @@ var constants = {
</td> </td>
</tr> </tr>
[% END %] [% END %]
[% IF field.type == constants.FIELD_TYPE_BUG_ID_REV || !field.id %] [% IF !field.id || field.type == constants.FIELD_TYPE_BUG_ID_REV %]
<tr valign="top" id="bug_id_rev_row"> <tr valign="top" id="bug_id_rev_row">
<th colspan="2" align="left"><label for="bug_id_rev_value_field_id"> <th colspan="2" align="left"><label for="bug_id_rev_value_field_id">
Direct Bug ID field for this reverse one: Direct Bug ID field for this reverse one:
@ -374,7 +409,7 @@ var constants = {
[% IF field.obsolete AND field.custom %] [% IF field.obsolete AND field.custom %]
<p> <p>
<a href="editfields.cgi?action=del&amp;name=[% field.name | html %]">Remove this custom field from the database.</a><br /> <a href="editfields.cgi?action=del&amp;name=[% field.name | html %]">Remove this custom field from the database.</a><br />
This action will only be successful if the custom field has never been used in [% terms.abug %]. This action will only be successful if the custom field is cleared in all [% terms.bugs %].
</p> </p>
[% END %] [% END %]

View File

@ -65,7 +65,7 @@
}, },
{ {
name => "obsolete" name => "obsolete"
heading => "Obsolete" heading => "Disabled"
hint => "Is disabled and unused" hint => "Is disabled and unused"
content_values => { '0' => '', '1' => 'Yes' } content_values => { '0' => '', '1' => 'Yes' }
align => 'center' align => 'center'
@ -73,8 +73,6 @@
] ]
%] %]
[% USE Bugzilla %]
[%# We want to display the type name of fields, not their type ID. %] [%# We want to display the type name of fields, not their type ID. %]
[% overrides.type = {} %] [% overrides.type = {} %]
@ -97,9 +95,9 @@
<h2>Custom fields</h2> <h2>Custom fields</h2>
[% PROCESS admin/table.html.tmpl [% PROCESS admin/table.html.tmpl
columns = columns columns = columns
overrides = overrides overrides = overrides
data = Bugzilla.get_fields({custom => 1, sort => 1}) data = Bugzilla.get_fields({custom => 1, sort => 1})
%] %]
<p> <p>
@ -113,12 +111,87 @@
<h2>Standard fields</h2> <h2>Standard fields</h2>
<p>
You can tweak the behaviour of standard [% terms.Bugzilla %] fields in various ways:
enable/disable them, set default values, allow or deny empty value, or even make
some of them depend on other fields.
</p>
<p>
Look for "Yes/No/Always" and tooltips in the table below for details.
</p>
[% overrides.obsolete.obsolete = {} %] [% overrides.obsolete.obsolete = {} %]
[% columns.0.heading = "Edit standard field..." %]
[% columns.4.block_name = "tweakable_boolean" %]
[% columns.5.block_name = "tweakable_boolean" %]
[% columns.6.block_name = "tweakable_boolean" %]
[% columns.7.block_name = "tweakable_boolean" %]
[% z = columns.splice(2, 2) %]
[% columns.push({
heading => 'Default'
hint => 'Can you select the default value for this field?'
block_name => 'is_tweakable_default'
align => 'center'
}, {
heading => 'Values'
hint => 'Can you make this field values to depend on other fields?'
block_name => 'is_tweakable_values'
align => 'center'
}, {
heading => 'Visible'
hint => 'Can you show/hide this field depending on other fields?'
block_name => 'is_tweakable_visible'
align => 'center'
}) %]
[% tweaks = {
'mailhead' => 'You can show/hide this field from new ' _ terms.bug _ ' mail'
'clone_bug' => 'You can choose whether to copy this field when cloning ' _ terms.bugs
'nullable' => 'You can choose whether to allow this field to be empty'
'obsolete' => 'You can enable/disable this field'
'default_field_id' => 'You can select the default value for this field and make the default value depend on other fields'
'visibility_field_id' => 'You can show or hide this field based on the value of some other field'
'value_field_id' => 'You can show or hide this field based on the value of some other field'
} %]
[% BLOCK tweakable_boolean %]
[% IF row.can_tweak(c.name) %]
<abbr title="[% tweaks.${c.name} %]" style="color: [% row.${c.name} ? 'green">Yes' : '#a00">No' %]</abbr>
[% ELSE %]
<span style="color: gray">[% row.${c.name} ? 'Always' : '' %]</span>
[% END %]
[% END %]
[% BLOCK is_tweakable_default %]
[% IF row.can_tweak('default_field_id') %]
<abbr title="[% tweaks.default_field_id %]" style="color: blue">per-[% row.default_field ? row.default_field.description : 'any' | html %]</abbr>
[% ELSIF row.can_tweak('default_value') %]
<abbr title="You can select the default value for this field globally
[%- IF row.default_field %] or per each [% row.default_field.description | html %][% END %]" style="color: green">
[% row.default_field ? 'per-' _ row.default_field.description : 'global' | html %]</abbr>
[% END %]
[% END %]
[% BLOCK is_tweakable_values %]
[% IF row.can_tweak('value_field_id') || row.value_field_id %]
[% IF row.can_tweak('value_field_id') %]<abbr title="[% tweaks.value_field_id %]" style="color: blue">[% END %]
per-[% row.value_field && row.value_field.description || 'any' %]
[% IF row.can_tweak('value_field_id') %]</abbr>[% END %]
[% END %]
[% END %]
[% BLOCK is_tweakable_visible %]
[% IF row.can_tweak('visibility_field_id') || row.visibility_field_id %]
[% IF row.can_tweak('visibility_field_id') %]<abbr title="[% tweaks.visibility_field_id %]" style="color: blue">[% END %]
per-[% row.visibility_field && row.visibility_field.description || 'any' %]
[% IF row.can_tweak('visibility_field_id') %]</abbr>[% END %]
[% END %]
[% END %]
[% PROCESS admin/table.html.tmpl [% PROCESS admin/table.html.tmpl
columns = columns columns = columns
overrides = overrides overrides = overrides
data = Bugzilla.get_fields({custom => 0, sort => 'name'}) data = Bugzilla.get_fields({custom => 0, sort => 'name'})
%] %]
[% PROCESS global/footer.html.tmpl %] [% PROCESS global/footer.html.tmpl %]

View File

@ -18,8 +18,6 @@
# fields: Array of hashes. Each hash contains only one key, "name." # fields: Array of hashes. Each hash contains only one key, "name."
# The names are the same as the keys from field_descs # The names are the same as the keys from field_descs
#%] #%]
[% USE Bugzilla %]
[% cgi = Bugzilla.cgi %]
[% PROCESS global/header.html.tmpl [% PROCESS global/header.html.tmpl
title = "Edit values for which field?" title = "Edit values for which field?"
@ -35,8 +33,8 @@
%] %]
[% PROCESS admin/table.html.tmpl [% PROCESS admin/table.html.tmpl
columns = columns columns = columns
data = fields data = fields
%] %]
[% PROCESS global/footer.html.tmpl %] [% PROCESS global/footer.html.tmpl %]

View File

@ -25,9 +25,6 @@
# showbugcounts: if defined, then bug counts should be included in the table # showbugcounts: if defined, then bug counts should be included in the table
#%] #%]
[% USE Bugzilla %]
[% cgi = Bugzilla.cgi %]
[% title = BLOCK %]Select milestone of product [% title = BLOCK %]Select milestone of product
'[% product.name FILTER html %]'[% END %] '[% product.name FILTER html %]'[% END %]
[% PROCESS global/header.html.tmpl [% PROCESS global/header.html.tmpl

View File

@ -64,4 +64,21 @@
"Allow to assign bugs to other people, i.e. allow to set bug status " _ "Allow to assign bugs to other people, i.e. allow to set bug status " _
"that has 'is assigned' flag turned on if 'assigned to' is not equal to you." "that has 'is assigned' flag turned on if 'assigned to' is not equal to you."
auto_add_flag_requestees_to_cc =>
"Add flag requestees to bug CC list automatically " _
"to grant them the rights to view/change the bug if they " _
"aren't in product groups."
clear_requests_on_close =>
"Clear all unanswered flag requests when changing bug status to CLOSED."
unauth_bug_details =>
"Show product name to the user in Unauthorized message if he doesn't have access to bug."
preview_comment_lines =>
"Set this to N to partially hide comments longer than N lines."
comment_line_length =>
"This count of characters counts as a 'line' when hiding comments, even if there are no line breaks."
} %] } %]

View File

@ -24,43 +24,4 @@
%] %]
[% param_descs = { [% param_descs = {
useclassification => "If this is on, $terms.Bugzilla will associate each product with a " _
"specific classification. But you must have 'editclassification' " _
"permissions enabled in order to edit classifications.",
usetargetmilestone => "Do you wish to use the Target Milestone field?",
useqacontact => "Do you wish to use the QA Contact field?",
usestatuswhiteboard => "Do you wish to use the Status Whiteboard field?",
useplatform => "Do you wish to use the Hardware Platform field?",
useopsys => "Do you wish to use the Operating System field?",
usevotes => "Do you wish to allow users to vote for ${terms.bugs}? Note that in order " _
"for this to be effective, you will have to change the maximum " _
"votes allowed in a product to be non-zero in " _
"<a href=\"editproducts.cgi\">the product edit page</a>.",
usebugaliases => "Do you wish to use $terms.bug aliases, which allow you to assign " _
"$terms.bugs an easy-to-remember name by which you can refer to them?",
use_see_also =>
"Do you wish to use the See Also field? It allows you refer to"
_ " $terms.bugs in other installations. Even if you disable this field,"
_ " $terms.bug relationships (URLs) already set on $terms.bugs will"
_ " still appear and can be removed.",
auto_add_flag_requestees_to_cc => "Add flag requestees to bug CC list automatically " _
"to grant them the rights to view/change the bug if they " _
"aren't in product groups?",
clear_requests_on_close => "Clear all unanswered flag requests when changing bug status to CLOSED",
unauth_bug_details => "Show product name to the user in Unauthorized message if he doesn't have access to bug.",
comment_line_length => "Symbols in one \"line\" whithout linebreaks.",
preview_comment_lines => "If comment's count of lines (one line is &lt;comment_line_length&gt; symbols or linebreaked line) is greater this value preview of text is shown.",
} %] } %]

View File

@ -16,7 +16,7 @@
[%# INTERFACE: [%# INTERFACE:
# product: Bugzilla::Product object; The product # product: Bugzilla::Product object; The product
# #
# (classification fields available if Param('useclassification') is enabled:) # (classification fields available if classification is enabled)
# #
# classification: Bugzilla::Classification object; The classification # classification: Bugzilla::Classification object; The classification
# the product is in # the product is in
@ -37,7 +37,7 @@
<th valign="top" align="left">Value</th> <th valign="top" align="left">Value</th>
</tr> </tr>
[% IF Param('useclassification') %] [% IF Bugzilla.get_field('classification').enabled %]
<tr> <tr>
<td>Classification:</td> <td>Classification:</td>
<td>[% classification.name FILTER html %]</td> <td>[% classification.name FILTER html %]</td>
@ -142,7 +142,7 @@
</tr> </tr>
[% IF Param('usetargetmilestone') %] [% IF Bugzilla.get_field('target_milestone').enabled %]
<tr> <tr>
<td valign="top"> <td valign="top">
[% IF product.milestones.size > 0 %] [% IF product.milestones.size > 0 %]

View File

@ -21,7 +21,7 @@
# classification: Bugzilla::Classifiation object; classification product is in. # classification: Bugzilla::Classifiation object; classification product is in.
#%] #%]
[% IF Param('useclassification') %] [% IF Bugzilla.get_field('classification').enabled %]
<tr> <tr>
<th align="left"><b>Classification:</b></th> <th align="left"><b>Classification:</b></th>
<td><select name="classification"> <td><select name="classification">
@ -52,10 +52,10 @@
<td> <td>
<input type="checkbox" id="allows_unconfirmed" name="allows_unconfirmed" <input type="checkbox" id="allows_unconfirmed" name="allows_unconfirmed"
[% ' checked="checked"' IF product.allows_unconfirmed %] [% ' checked="checked"' IF product.allows_unconfirmed %]
[% IF Param('usevotes') %] [% IF Bugzilla.get_field('votes').enabled %]
onchange="toggleClass('votes_to_confirm_container', 'bz_default_hidden')" onchange="toggleClass('votes_to_confirm_container', 'bz_default_hidden')"
[% END %] /> [% END %] />
[% IF Param('usevotes') %] [% IF Bugzilla.get_field('votes').enabled %]
<span id="votes_to_confirm_container" [% ' class="bz_default_hidden"' IF !product.allows_unconfirmed %]> <span id="votes_to_confirm_container" [% ' class="bz_default_hidden"' IF !product.allows_unconfirmed %]>
...and automatically confirm [% terms.bugs %] if they get ...and automatically confirm [% terms.bugs %] if they get
<input size="3" maxlength="5" name="votestoconfirm" <input size="3" maxlength="5" name="votestoconfirm"
@ -113,7 +113,7 @@
</td> </td>
</tr> </tr>
[% IF Param('usevotes') %] [% IF Bugzilla.get_field('votes').enabled %]
<tr> <tr>
<th align="left">Maximum votes:</label></th> <th align="left">Maximum votes:</label></th>
<td> <td>
@ -126,7 +126,7 @@
</tr> </tr>
[% END %] [% END %]
[% IF Param('usetargetmilestone') && product.milestones.size -%] [% IF Bugzilla.get_field('target_milestone').enabled && product.milestones.size -%]
<tr> <tr>
<th align="left"><label for="defaultmilestone">Default milestone:</label></th> <th align="left"><label for="defaultmilestone">Default milestone:</label></th>
<td> <td>

View File

@ -18,7 +18,7 @@
[%# INTERFACE: [%# INTERFACE:
# product: Bugzilla::Product object; The product # product: Bugzilla::Product object; The product
# #
# (classification fields available if Param('useclassification') is enabled:) # (classification fields available if classification is enabled:)
# #
# classification: Bugzilla::Classification object; The classification # classification: Bugzilla::Classification object; The classification
# the product is in # the product is in
@ -79,7 +79,7 @@
[% END %] [% END %]
</td> </td>
</tr> </tr>
[% IF Param('usetargetmilestone') %] [% IF Bugzilla.get_field('target_milestone').enabled %]
<tr> <tr>
<th align="left" valign="top"> <th align="left" valign="top">
<a href="editmilestones.cgi?product=[% product.name FILTER url_quote %]"> <a href="editmilestones.cgi?product=[% product.name FILTER url_quote %]">

View File

@ -28,7 +28,7 @@
# no_add_product_link # no_add_product_link
#%] #%]
[% IF Param('useclassification') && classification %] [% IF Bugzilla.get_field('classification').enabled && classification %]
[% classification_url_part = BLOCK %]&amp;classification= [% classification_url_part = BLOCK %]&amp;classification=
[%- classification.name FILTER url_quote %] [%- classification.name FILTER url_quote %]
[% END %] [% END %]
@ -45,7 +45,7 @@
[%# Strictly speaking, we should not have to check for a [%# Strictly speaking, we should not have to check for a
classification if they are enabled, but I'm just being paranoid %] classification if they are enabled, but I'm just being paranoid %]
[% UNLESS no_add_product_link || !user.in_group("editcomponents") %] [% UNLESS no_add_product_link || !user.in_group("editcomponents") %]
[% IF Param('useclassification') && classification %] [% IF Bugzilla.get_field('classification').enabled && classification %]
<p> <p>
<a title="Add a product to classification [% classification.name | html %]" <a title="Add a product to classification [% classification.name | html %]"
href="editproducts.cgi?action=add[% classification_url_part %]"> href="editproducts.cgi?action=add[% classification_url_part %]">
@ -75,7 +75,7 @@
[% classification_text %]</a>. [% classification_text %]</a>.
[% END %] [% END %]
[% IF Param('useclassification') && classification [% IF Bugzilla.get_field('classification').enabled && classification
&& user.in_group('editclassifications') %] && user.in_group('editclassifications') %]
Edit classification <a href="editclassifications.cgi?action=edit Edit classification <a href="editclassifications.cgi?action=edit
[%- classification_url_part %]">' [%- classification_url_part %]">'

View File

@ -302,7 +302,6 @@
[% END %] [% END %]
[% END %] [% END %]
[% USE Bugzilla %]
[% IF Bugzilla.usage_mode == constants.USAGE_MODE_CMDLINE %] [% IF Bugzilla.usage_mode == constants.USAGE_MODE_CMDLINE %]
[% san_message FILTER none %] [% san_message FILTER none %]
[% ELSE %] [% ELSE %]

View File

@ -116,6 +116,7 @@
class = c.class class = c.class
allow_html_content = c.allow_html_content allow_html_content = c.allow_html_content
yesno_field = c.yesno_field yesno_field = c.yesno_field
block_name = c.block_name
%] %]
[%# Get any specific "important" overrides for this c.name and row.name ? %] [%# Get any specific "important" overrides for this c.name and row.name ? %]
@ -141,6 +142,10 @@
<td [% IF align %] align="[% align FILTER html %]" [% END %] <td [% IF align %] align="[% align FILTER html %]" [% END %]
[% IF class %] class="[% class FILTER html %]" [% END %]> [% IF class %] class="[% class FILTER html %]" [% END %]>
[% IF block_name %]
[% block_name FILTER process %]
[% ELSE %]
[% IF contentlink %] [% IF contentlink %]
[% link_uri = contentlink %] [% link_uri = contentlink %]
[% WHILE link_uri.search('%%(.+?)%%')%] [% WHILE link_uri.search('%%(.+?)%%')%]
@ -181,6 +186,8 @@
</a> </a>
[% END %] [% END %]
[% END %]
</td> </td>
[% END %] [% END %]
</tr> </tr>

View File

@ -25,8 +25,6 @@
title = "Already filed attachment" title = "Already filed attachment"
%] %]
[% USE Bugzilla %]
<table cellpadding="20"> <table cellpadding="20">
<tr> <tr>
<td style="background: #ffe0e0; border: 10px solid red"> <td style="background: #ffe0e0; border: 10px solid red">

View File

@ -28,7 +28,6 @@
#%] #%]
[%# The global Bugzilla->cgi object is used to obtain form variable values. %] [%# The global Bugzilla->cgi object is used to obtain form variable values. %]
[% USE Bugzilla %]
[% cgi = Bugzilla.cgi %] [% cgi = Bugzilla.cgi %]
[% PROCESS global/header.html.tmpl title = "Mid-air collision!" %] [% PROCESS global/header.html.tmpl title = "Mid-air collision!" %]

View File

@ -1,5 +1,3 @@
[% USE Bugzilla %]
<html> <html>
<head> <head>

View File

@ -24,8 +24,7 @@
# enter_bug.cgi) can be access via Bugzilla.cgi.param. It can be used to # enter_bug.cgi) can be access via Bugzilla.cgi.param. It can be used to
# pull out various custom fields and format an initial Description entry # pull out various custom fields and format an initial Description entry
# from them. # from them.
#%] #%]
[% USE Bugzilla %]
[% cgi = Bugzilla.cgi %] [% cgi = Bugzilla.cgi %]
User-Agent: [%+ cgi.user_agent() %] User-Agent: [%+ cgi.user_agent() %]
Build Identifier: [%+ cgi.param("buildid") %] Build Identifier: [%+ cgi.param("buildid") %]

View File

@ -25,7 +25,6 @@
# pull out various custom fields and format an initial Description entry # pull out various custom fields and format an initial Description entry
# from them. # from them.
#%] #%]
[% USE Bugzilla %]
[% Hook.process("form") %] [% Hook.process("form") %]

View File

@ -24,8 +24,6 @@
title = "Already filed $terms.bug" title = "Already filed $terms.bug"
%] %]
[% USE Bugzilla %]
<table cellpadding="20"> <table cellpadding="20">
<tr> <tr>
<td bgcolor="#ff0000"> <td bgcolor="#ff0000">

View File

@ -23,7 +23,6 @@
# This template has the same interface as create.html.tmpl # This template has the same interface as create.html.tmpl
#%] #%]
[% USE Bugzilla %]
[% cgi = Bugzilla.cgi %] [% cgi = Bugzilla.cgi %]
[% PROCESS global/header.html.tmpl [% PROCESS global/header.html.tmpl
@ -240,7 +239,7 @@ function PutDescription() {
[% matches = cgi.user_agent('Gecko/(\d+)') %] [% matches = cgi.user_agent('Gecko/(\d+)') %]
[% buildid = cgi.user_agent() IF matches %] [% buildid = cgi.user_agent() IF matches %]
[% END %] [% END %]
[%# Accept URL parameter build ID for non-browser products %] [%# Accept URL parameter build ID for non-browser products %]
[% IF cgi.param("buildid") %] [% IF cgi.param("buildid") %]
[% buildid = cgi.param("buildid") %] [% buildid = cgi.param("buildid") %]

View File

@ -24,8 +24,6 @@
# Frédéric Buclin <LpSolit@gmail.com> # Frédéric Buclin <LpSolit@gmail.com>
#%] #%]
[% USE Bugzilla %]
[% title = BLOCK %]Enter [% terms.Bug %]: [% product.name | html %][% END %] [% title = BLOCK %]Enter [% terms.Bug %]: [% product.name | html %][% END %]
[% PROCESS global/header.html.tmpl [% PROCESS global/header.html.tmpl
@ -62,7 +60,6 @@ var close_status_array = [
--> -->
</script> </script>
[% USE Bugzilla %]
[% SET select_fields = {} %] [% SET select_fields = {} %]
[% FOREACH field = Bugzilla.get_fields( [% FOREACH field = Bugzilla.get_fields(
{ type => constants.FIELD_TYPE_SINGLE_SELECT, custom => 0 }) { type => constants.FIELD_TYPE_SINGLE_SELECT, custom => 0 })
@ -140,7 +137,7 @@ var close_status_array = [
value_name = default.bug_severity %] value_name = default.bug_severity %]
</tr> </tr>
[% IF Param('useplatform') %] [% IF Bugzilla.get_field('rep_platform').enabled %]
<tr> <tr>
[% INCLUDE bug/field.html.tmpl [% INCLUDE bug/field.html.tmpl
bug = default, field = select_fields.rep_platform, editable = 1, bug = default, field = select_fields.rep_platform, editable = 1,
@ -148,7 +145,7 @@ var close_status_array = [
</tr> </tr>
[% END %] [% END %]
[% IF Param('useopsys') %] [% IF Bugzilla.get_field('op_sys').enabled %]
<tr> <tr>
[% INCLUDE bug/field.html.tmpl [% INCLUDE bug/field.html.tmpl
bug = default, field = select_fields.op_sys, editable = 1, bug = default, field = select_fields.op_sys, editable = 1,
@ -159,7 +156,7 @@ var close_status_array = [
<tbody class="expert_fields"> <tbody class="expert_fields">
<tr> <tr>
[% IF Param('usetargetmilestone') && Param('letsubmitterchoosemilestone') %] [% IF Bugzilla.get_field('target_milestone').enabled && Param('letsubmitterchoosemilestone') %]
[% INCLUDE bug/field.html.tmpl [% INCLUDE bug/field.html.tmpl
bug = default, field = select_fields.target_milestone, editable = 1, bug = default, field = select_fields.target_milestone, editable = 1,
value_name = default.target_milestone %] value_name = default.target_milestone %]
@ -177,8 +174,8 @@ var close_status_array = [
</tr> </tr>
</tbody> </tbody>
[% guess_platform = Param('useplatform') && !Bugzilla.get_field('rep_platform').default_value %] [% guess_platform = Bugzilla.get_field('rep_platform').enabled && !Bugzilla.get_field('rep_platform').default_value %]
[% guess_os = Param('useopsys') && !Bugzilla.get_field('op_sys').default_value %] [% guess_os = Bugzilla.get_field('op_sys').enabled && !Bugzilla.get_field('op_sys').default_value %]
[% IF guess_platform || guess_os %] [% IF guess_platform || guess_os %]
<tbody> <tbody>
<tr> <tr>
@ -238,7 +235,7 @@ var close_status_array = [
</td> </td>
[%# Calculate the number of rows we can use for flags %] [%# Calculate the number of rows we can use for flags %]
[% num_rows = 2 + (Param("useqacontact") ? 1 : 0) %] [% num_rows = 2 + (Bugzilla.get_field('qa_contact').enabled ? 1 : 0) %]
<td colspan="2" rowspan="[% num_rows | html %]"> <td colspan="2" rowspan="[% num_rows | html %]">
[% IF product.flag_types.bug.size > 0 %] [% IF product.flag_types.bug.size > 0 %]
@ -262,7 +259,7 @@ var close_status_array = [
</td> </td>
</tr> </tr>
[% IF Param("useqacontact") %] [% IF Bugzilla.get_field('qa_contact').enabled %]
<tr> <tr>
<th>QA Contact:</th> <th>QA Contact:</th>
<td> <td>
@ -327,8 +324,6 @@ var close_status_array = [
</tbody> </tbody>
<tbody class="expert_fields"> <tbody class="expert_fields">
[% USE Bugzilla %]
[% FOREACH field = Bugzilla.active_custom_fields %] [% FOREACH field = Bugzilla.active_custom_fields %]
<tr id="field_row_[% field.name | html %]"> <tr id="field_row_[% field.name | html %]">
[%# Do not care about missing default value IDs or objects - JS will re-fill dependent fields %] [%# Do not care about missing default value IDs or objects - JS will re-fill dependent fields %]
@ -439,7 +434,7 @@ var close_status_array = [
[% IF use_keywords %] [% IF use_keywords %]
<tr> <tr>
<th><a href="describekeywords.cgi">Keywords</a>:</th> <th><a href="describekeywords.cgi">Keywords</a>:</th>
[% UNLESS Param("usebugaliases") %] [% IF !Bugzilla.get_field('alias').enabled %]
<td colspan="3"> <td colspan="3">
[% ELSE %] [% ELSE %]
<td> <td>
@ -450,19 +445,19 @@ var close_status_array = [
</script> </script>
<div id="keywords_description_container"></div> <div id="keywords_description_container"></div>
</td> </td>
[% IF Param("usebugaliases") %] [% IF Bugzilla.get_field('alias').enabled %]
<th>Alias:</th> <th>Alias:</th>
<td><input name="alias" size="20" value="[% default.alias | html %]" /></td> <td><input name="alias" size="20" value="[% default.alias | html %]" /></td>
[% END %] [% END %]
</tr> </tr>
[% ELSIF Param("usebugaliases") %] [% ELSIF Bugzilla.get_field('alias').enabled %]
<tr> <tr>
<th>Alias:</th> <th>Alias:</th>
<td colspan="3"><input name="alias" size="20" value="[% default.alias | html %]" /></td> <td colspan="3"><input name="alias" size="20" value="[% default.alias | html %]" /></td>
</tr> </tr>
[% END %] [% END %]
[% END %] [% END %]
[% IF Param('usestatuswhiteboard') %] [% IF Bugzilla.get_field('status_whiteboard').enabled %]
<tr> <tr>
<th>Whiteboard:</th> <th>Whiteboard:</th>
<td colspan="3"> <td colspan="3">

View File

@ -26,7 +26,6 @@
[% PROCESS bug/time.html.tmpl %] [% PROCESS bug/time.html.tmpl %]
[% USE Bugzilla %]
[% SET select_fields = {} %] [% SET select_fields = {} %]
[% FOREACH field = Bugzilla.get_fields( [% FOREACH field = Bugzilla.get_fields(
{ type => constants.FIELD_TYPE_SINGLE_SELECT, custom => 0 }) { type => constants.FIELD_TYPE_SINGLE_SELECT, custom => 0 })
@ -178,7 +177,7 @@ document.changeform = document.[% cfname %];
<a href="show_bug.cgi?id=[% bug.bug_id %]"> <a href="show_bug.cgi?id=[% bug.bug_id %]">
[%-# %]<b>[% terms.Bug %]&nbsp;[% bug.bug_id FILTER html %]</b> [%-# %]<b>[% terms.Bug %]&nbsp;[% bug.bug_id FILTER html %]</b>
[%-# %]</a> -<span id="summary_alias_container" class="bz_default_hidden"> [%-# %]</a> -<span id="summary_alias_container" class="bz_default_hidden">
[% IF Param("usebugaliases") %] [% IF Bugzilla.get_field('alias').enabled %]
[% IF bug.alias != "" %] [% IF bug.alias != "" %]
(<span id="alias_nonedit_display">[% bug.alias FILTER html %]</span>) (<span id="alias_nonedit_display">[% bug.alias FILTER html %]</span>)
[% END %] [% END %]
@ -193,7 +192,7 @@ document.changeform = document.[% cfname %];
<div id="summary_alias_input"> <div id="summary_alias_input">
<table id="summary"> <table id="summary">
[% IF Param("usebugaliases") %] [% IF Bugzilla.get_field('alias').enabled %]
<tr> <tr>
[% IF bug.check_can_change_field('alias', 0, 1) %] [% IF bug.check_can_change_field('alias', 0, 1) %]
<td> <td>
@ -270,13 +269,13 @@ document.changeform = document.[% cfname %];
[%###################%] [%###################%]
[%# PLATFORM AND OS #%] [%# PLATFORM AND OS #%]
[%###################%] [%###################%]
[% IF Param('useplatform') OR Param('useopsys') %] [% IF Bugzilla.get_field('rep_platform').enabled OR Bugzilla.get_field('op_sys').enabled %]
<tr> <tr>
<td class="field_label"> <td class="field_label">
<label for="rep_platform" accesskey="h"><b>Platform</b></label>: <label for="rep_platform" accesskey="h"><b>OS/Platform</b></label>:
</td> </td>
<td class="field_value"> <td class="field_value">
[% IF Param('useplatform') %] [% IF Bugzilla.get_field('rep_platform').enabled %]
<span id="field_row_rep_platform"> <span id="field_row_rep_platform">
[% INCLUDE bug/field.html.tmpl [% INCLUDE bug/field.html.tmpl
bug = bug, field = select_fields.rep_platform, bug = bug, field = select_fields.rep_platform,
@ -284,7 +283,7 @@ document.changeform = document.[% cfname %];
editable = bug.check_can_change_field('rep_platform', 0, 1) %] editable = bug.check_can_change_field('rep_platform', 0, 1) %]
</span> </span>
[% END %] [% END %]
[% IF Param('useopsys') %] [% IF Bugzilla.get_field('op_sys').enabled %]
<span id="field_row_op_sys"> <span id="field_row_op_sys">
[%+ INCLUDE bug/field.html.tmpl [%+ INCLUDE bug/field.html.tmpl
bug = bug, field = select_fields.op_sys, bug = bug, field = select_fields.op_sys,
@ -373,7 +372,7 @@ document.changeform = document.[% cfname %];
</td> </td>
</tr> </tr>
[% IF Param("usetargetmilestone") %] [% IF Bugzilla.get_field('target_milestone').enabled %]
<tr id="field_row_target_milestone"> <tr id="field_row_target_milestone">
[% INCLUDE bug/field.html.tmpl [% INCLUDE bug/field.html.tmpl
bug = bug, field = select_fields.target_milestone, bug = bug, field = select_fields.target_milestone,
@ -427,7 +426,7 @@ document.changeform = document.[% cfname %];
</td> </td>
</tr> </tr>
[% IF Param('useqacontact') %] [% IF Bugzilla.get_field('qa_contact').enabled %]
<tr> <tr>
<td class="field_label"> <td class="field_label">
<label for="qa_contact" accesskey="q"><b><u>Q</u>A Contact</b></label>: <label for="qa_contact" accesskey="q"><b><u>Q</u>A Contact</b></label>:
@ -522,7 +521,7 @@ document.changeform = document.[% cfname %];
</td> </td>
</tr> </tr>
[% IF Param('usestatuswhiteboard') %] [% IF Bugzilla.get_field('status_whiteboard').enabled %]
<tr> <tr>
<td class="field_label"> <td class="field_label">
<label for="status_whiteboard" accesskey="w"><b><u>W</u>hiteboard</b></label>: <label for="status_whiteboard" accesskey="w"><b><u>W</u>hiteboard</b></label>:
@ -660,7 +659,7 @@ document.changeform = document.[% cfname %];
</div> </div>
<p class="instructions"> <p class="instructions">
The assignee The assignee
[% IF (Param('useqacontact')) %] [% IF Bugzilla.get_field('qa_contact').enabled %]
and QA contact and QA contact
[% END %] [% END %]
can always see [% terms.abug %], and this section does not can always see [% terms.abug %], and this section does not
@ -710,7 +709,7 @@ document.changeform = document.[% cfname %];
[% IF user.id && (NOT bug.cc || NOT bug.cc.contains(user.login)) %] [% IF user.id && (NOT bug.cc || NOT bug.cc.contains(user.login)) %]
<div id="cc_edit_add_self"> <div id="cc_edit_add_self">
[% has_role = bug.user.isreporter || bug.assigned_to.id == user.id || [% has_role = bug.user.isreporter || bug.assigned_to.id == user.id ||
(Param('useqacontact') && bug.qa_contact && bug.qa_contact.id == user.id) %] (Bugzilla.get_field('qa_contact').enabled && bug.qa_contact && bug.qa_contact.id == user.id) %]
<input type="checkbox" id="addselfcc" name="addselfcc" <input type="checkbox" id="addselfcc" name="addselfcc"
[% " checked=\"checked\"" [% " checked=\"checked\""
IF user.settings.state_addselfcc.value == 'always' IF user.settings.state_addselfcc.value == 'always'
@ -777,7 +776,7 @@ document.changeform = document.[% cfname %];
[%# Block for See Also #%] [%# Block for See Also #%]
[%############################################################################%] [%############################################################################%]
[% BLOCK section_see_also %] [% BLOCK section_see_also %]
[% IF Param('use_see_also') || bug.see_also.size %] [% IF Bugzilla.get_field('see_also').enabled || bug.see_also.size %]
<tr id="field_row_see_also"> <tr id="field_row_see_also">
[% INCLUDE bug/field.html.tmpl [% INCLUDE bug/field.html.tmpl
field = bug_fields.see_also field = bug_fields.see_also

View File

@ -217,7 +217,7 @@
[% END %] [% END %]
[% '</ul>' IF value.size %] [% '</ul>' IF value.size %]
[% IF editable && Param('use_see_also') %] [% IF editable && Bugzilla.get_field('see_also').enabled %]
<label for="[% field.name | html %]"> <label for="[% field.name | html %]">
<strong>Add [% terms.Bug %] URLs:</strong> <strong>Add [% terms.Bug %] URLs:</strong>
</label><br> </label><br>

View File

@ -30,8 +30,6 @@
# commentsilent: boolean; whether sending of the e-mails was suppressed. # commentsilent: boolean; whether sending of the e-mails was suppressed.
#%] #%]
[% USE Bugzilla %]
[% DEFAULT type="bug" %] [% DEFAULT type="bug" %]
[% Link = BLOCK %][% "$terms.Bug $bug_id" FILTER bug_link(bug_id) %][% END %] [% Link = BLOCK %][% "$terms.Bug $bug_id" FILTER bug_link(bug_id) %][% END %]

View File

@ -1,4 +1,3 @@
[% USE Bugzilla %]
[% cgi = Bugzilla.cgi %] [% cgi = Bugzilla.cgi %]
[% PROCESS global/header.html.tmpl title='Verify Field Values' %] [% PROCESS global/header.html.tmpl title='Verify Field Values' %]

View File

@ -2,7 +2,6 @@
# License: Dual-license MPL 1.1+ or GPL 3.0+ # License: Dual-license MPL 1.1+ or GPL 3.0+
# Author(s): Vitaliy Filippov, Stas Fomin %] # Author(s): Vitaliy Filippov, Stas Fomin %]
[% USE Bugzilla %]
[% cgi = Bugzilla.cgi %] [% cgi = Bugzilla.cgi %]
[% PROCESS global/header.html.tmpl title='Verify flag requests' %] [% PROCESS global/header.html.tmpl title='Verify flag requests' %]

View File

@ -21,8 +21,6 @@
# Max Kanat-Alexander <mkanat@bugzilla.org> # Max Kanat-Alexander <mkanat@bugzilla.org>
#%] #%]
[% USE Bugzilla %]
[% subheader = bug.short_desc | html %] [% subheader = bug.short_desc | html %]
[% DEFAULT title = "$terms.Bug $bug.bug_id $bug.short_desc " _ [% DEFAULT title = "$terms.Bug $bug.bug_id $bug.short_desc " _
"${bug.product_obj.name}/${bug.component_obj.name} " _ "${bug.product_obj.name}/${bug.component_obj.name} " _

View File

@ -66,7 +66,7 @@
[% BLOCK bug_display %] [% BLOCK bug_display %]
<h1> <h1>
[% terms.Bug %] <a href="show_bug.cgi?id=[% bug.bug_id | html %]">[% bug.bug_id | html %]</a> [% terms.Bug %] <a href="show_bug.cgi?id=[% bug.bug_id | html %]">[% bug.bug_id | html %]</a>
[% IF Param("usebugaliases") AND bug.alias %] [% IF Bugzilla.get_field('alias').enabled AND bug.alias %]
(<a href="show_bug.cgi?id=[% bug.alias | url_quote %]"> (<a href="show_bug.cgi?id=[% bug.alias | url_quote %]">
[% bug.alias | html %]</a>) [% bug.alias | html %]</a>)
[% END %] [% END %]
@ -78,7 +78,7 @@
<td class="error"> <td class="error">
[% IF bug.error == "InvalidBugId" %] [% IF bug.error == "InvalidBugId" %]
'[%+ bug.bug_id | html %]' is not a valid [% terms.bug %] number '[%+ bug.bug_id | html %]' is not a valid [% terms.bug %] number
[%- IF Param("usebugaliases") %] nor a known [% terms.bug %] alias[% END %]. [%- IF Bugzilla.get_field('alias').enabled %] nor a known [% terms.bug %] alias[% END %].
[% ELSIF bug.error == "NotPermitted" %] [% ELSIF bug.error == "NotPermitted" %]
You are not allowed to view this [% terms.bug %]. You are not allowed to view this [% terms.bug %].
[% ELSIF bug.error == "NotFound" %] [% ELSIF bug.error == "NotFound" %]
@ -92,7 +92,7 @@
[%# The rightcell block (also called by the row block) automatically shows [%# The rightcell block (also called by the row block) automatically shows
# the fields from rightcells %] # the fields from rightcells %]
[% rightcells = ['reporter', 'assigned_to'] %] [% rightcells = ['reporter', 'assigned_to'] %]
[% IF Param('useqacontact') %] [% IF Bugzilla.get_field('qa_contact').enabled %]
[% rightcells.push('qa_contact') %] [% rightcells.push('qa_contact') %]
[% END %] [% END %]
[% rightcells.push('') %] [% rightcells.push('') %]
@ -116,7 +116,7 @@
<tr> <tr>
<th>[% field_descs.product | html %]:</th> <th>[% field_descs.product | html %]:</th>
<td> <td>
[% IF Param("useclassification") %] [% IF Bugzilla.get_field('classification').enabled %]
[% bug.classification_obj.name | html %]/ [% bug.classification_obj.name | html %]/
[%- END -%] [%- END -%]
[%- bug.product_obj.name | html %] [%- bug.product_obj.name | html %]
@ -156,9 +156,9 @@
</tr> </tr>
[% PROCESS row obj=1 cell="version" %] [% PROCESS row obj=1 cell="version" %]
[% PROCESS row obj=1 cell="target_milestone" IF Param('usetargetmilestone') %] [% PROCESS row obj=1 cell="target_milestone" IF Bugzilla.get_field('target_milestone').enabled %]
[% PROCESS row obj=1 cell="rep_platform" IF Param('useplatform') %] [% PROCESS row obj=1 cell="rep_platform" IF Bugzilla.get_field('rep_platform').enabled %]
[% PROCESS row obj=1 cell="op_sys" IF Param('useopsys') %] [% PROCESS row obj=1 cell="op_sys" IF Bugzilla.get_field('op_sys').enabled %]
[% obj=0 %] [% obj=0 %]
[% IF bug.bug_file_loc %] [% IF bug.bug_file_loc %]
@ -175,11 +175,10 @@
</tr> </tr>
[% END %] [% END %]
[% IF Param("usestatuswhiteboard") %] [% IF Bugzilla.get_field('status_whiteboard').enabled %]
[% PROCESS row cell = "status_whiteboard" fullrow = 1 %] [% PROCESS row cell = "status_whiteboard" fullrow = 1 %]
[% END %] [% END %]
[% USE Bugzilla %]
[% field_counter = 0 %] [% field_counter = 0 %]
[% FOREACH field = Bugzilla.active_custom_fields %] [% FOREACH field = Bugzilla.active_custom_fields %]
[% field_counter = field_counter + 1 %] [% field_counter = field_counter + 1 %]

View File

@ -75,7 +75,7 @@
</Seq> </Seq>
</bz:keyword> </bz:keyword>
[% IF Param('useplatform') %] [% IF Bugzilla.get_field('rep_platform').enabled %]
<bz:platform> <bz:platform>
<Seq> <Seq>
[% FOREACH item = platform %] [% FOREACH item = platform %]
@ -85,7 +85,7 @@
</bz:platform> </bz:platform>
[% END %] [% END %]
[% IF Param('useopsys') %] [% IF Bugzilla.get_field('op_sys').enabled %]
<bz:op_sys> <bz:op_sys>
<Seq> <Seq>
[% FOREACH item = op_sys %] [% FOREACH item = op_sys %]
@ -147,7 +147,7 @@
</Seq> </Seq>
</bz:versions> </bz:versions>
[% IF Param('usetargetmilestone') %] [% IF Bugzilla.get_field('target_milestone').enabled %]
<bz:target_milestones> <bz:target_milestones>
<Seq> <Seq>
[% FOREACH milestone = product.milestones %] [% FOREACH milestone = product.milestones %]
@ -206,7 +206,7 @@
</Seq> </Seq>
</bz:versions> </bz:versions>
[% IF Param('usetargetmilestone') %] [% IF Bugzilla.get_field('target_milestone').enabled %]
<bz:target_milestones> <bz:target_milestones>
<Seq> <Seq>
[% FOREACH product = products %] [% FOREACH product = products %]

View File

@ -28,7 +28,7 @@ Subject: [% (isnew ? '' : 'Re: ') _ '['
X-Bugzilla-Reason: [% reasonsheader %] X-Bugzilla-Reason: [% reasonsheader %]
X-Bugzilla-Type: [% isnew ? 'new' : 'changed' %] X-Bugzilla-Type: [% isnew ? 'new' : 'changed' %]
X-Bugzilla-Watch-Reason: [% reasonswatchheader %] X-Bugzilla-Watch-Reason: [% reasonswatchheader %]
[% IF Param('useclassification') %] [% IF Bugzilla.get_field('classification').enabled %]
X-Bugzilla-Classification: [% bug.classification_obj.name %] X-Bugzilla-Classification: [% bug.classification_obj.name %]
[% END %] [% END %]
[% IF bug.bug_severity_obj.name == 'blocker' OR bug.bug_severity_obj.name == 'critical' %] [% IF bug.bug_severity_obj.name == 'blocker' OR bug.bug_severity_obj.name == 'critical' %]

View File

@ -66,11 +66,11 @@
</table> </table>
[% IF target == "describecomponents.cgi" %] [% IF target == "describecomponents.cgi" AND Bugzilla.get_field('classification').enabled %]
<p><a href="describecomponents.cgi">Select other classification</a></p> <p><a href="describecomponents.cgi">Select other classification</a></p>
[% END %] [% END %]
[% IF target == "enter_bug.cgi" AND user AND NOT Param('useclassification') AND NOT cloned_bug_id AND user.in_group('importxls') %] [% IF target == "enter_bug.cgi" AND user AND NOT Bugzilla.get_field('classification').enabled AND NOT cloned_bug_id AND user.in_group('importxls') %]
<hr /> <hr />
<p class="importxls_link"><span>See also:</span> <a href="importxls.cgi">Mass bug import from Excel files</a>.</p> <p class="importxls_link"><span>See also:</span> <a href="importxls.cgi">Mass bug import from Excel files</a>.</p>
[% END %] [% END %]

View File

@ -15,7 +15,6 @@
#%] #%]
[%# We only want HTML error messages for ERROR_MODE_WEBPAGE %] [%# We only want HTML error messages for ERROR_MODE_WEBPAGE %]
[% USE Bugzilla %]
[% IF Bugzilla.error_mode != constants.ERROR_MODE_WEBPAGE %] [% IF Bugzilla.error_mode != constants.ERROR_MODE_WEBPAGE %]
[% IF Bugzilla.usage_mode == constants.USAGE_MODE_BROWSER %] [% IF Bugzilla.usage_mode == constants.USAGE_MODE_BROWSER %]
[% error_message FILTER none %] [% error_message FILTER none %]

View File

@ -21,7 +21,6 @@
#%] #%]
[% DEFAULT qs_suffix = "" %] [% DEFAULT qs_suffix = "" %]
[% USE Bugzilla %]
[% IF standalone %]<div style="margin: 5px">[% END %] [% IF standalone %]<div style="margin: 5px">[% END %]
<ul class="links"> <ul class="links">

View File

@ -58,8 +58,6 @@
[% IF matchsuccess == 1 %] [% IF matchsuccess == 1 %]
[% PROCESS global/header.html.tmpl title="Confirm Match" %] [% PROCESS global/header.html.tmpl title="Confirm Match" %]
[% USE Bugzilla %]
<form method="post" <form method="post"
[% IF script -%] [% IF script -%]
action="[% script %]" action="[% script %]"

View File

@ -37,8 +37,6 @@
# atomlink: Atom link URL, May contain HTML # atomlink: Atom link URL, May contain HTML
#%] #%]
[% USE Bugzilla %]
[% IF message %] [% IF message %]
[% message = BLOCK %][% PROCESS global/messages.html.tmpl %][% END %] [% message = BLOCK %][% PROCESS global/messages.html.tmpl %][% END %]
[% END %] [% END %]

View File

@ -18,10 +18,7 @@
# Contributor(s): Gervase Markham <gerv@gerv.net> # Contributor(s): Gervase Markham <gerv@gerv.net>
#%] #%]
[% USE Bugzilla %] [% IF Bugzilla.cgi.param("help") %]
[% cgi = Bugzilla.cgi %]
[% IF cgi.param("help") %]
<script type="text/javascript"> <!-- <script type="text/javascript"> <!--
[% FOREACH h = help_html %] [% FOREACH h = help_html %]
g_helpTexts["[% h.id FILTER js %]"] = "[%- h.html FILTER js -%]"; g_helpTexts["[% h.id FILTER js %]"] = "[%- h.html FILTER js -%]";

View File

@ -24,7 +24,6 @@
#%] #%]
[%# The global Bugzilla->cgi object is used to obtain form variable values. %] [%# The global Bugzilla->cgi object is used to obtain form variable values. %]
[% USE Bugzilla %]
[% cgi = Bugzilla.cgi %] [% cgi = Bugzilla.cgi %]
[%# Generate hidden form fields for non-excluded fields. %] [%# Generate hidden form fields for non-excluded fields. %]

View File

@ -23,7 +23,6 @@
# bug.bug_id: integer. Number of current bug (for navigation purposes) # bug.bug_id: integer. Number of current bug (for navigation purposes)
#%] #%]
[% USE Bugzilla %]
[% cgi = Bugzilla.cgi %] [% cgi = Bugzilla.cgi %]
[% IF NOT (cgi.user_agent("MSIE [1-6]") OR cgi.user_agent("Mozilla/4")) %] [% IF NOT (cgi.user_agent("MSIE [1-6]") OR cgi.user_agent("Mozilla/4")) %]

View File

@ -14,8 +14,6 @@
#%] #%]
[%# We only want HTML error messages for ERROR_MODE_WEBPAGE %] [%# We only want HTML error messages for ERROR_MODE_WEBPAGE %]
[% USE Bugzilla %]
[% IF Bugzilla.error_mode != constants.ERROR_MODE_WEBPAGE %] [% IF Bugzilla.error_mode != constants.ERROR_MODE_WEBPAGE %]
[% IF Bugzilla.usage_mode == constants.USAGE_MODE_BROWSER %] [% IF Bugzilla.usage_mode == constants.USAGE_MODE_BROWSER %]
[% error_message FILTER none %] [% error_message FILTER none %]

View File

@ -1071,7 +1071,7 @@
[% END %] [% END %]
[% IF bug_id %] [% IF bug_id %]
'[% bug_id FILTER html %]' is not a valid [% terms.bug %] number '[% bug_id FILTER html %]' is not a valid [% terms.bug %] number
[% IF Param("usebugaliases") %] [% IF Bugzilla.get_field('alias').enabled %]
nor an alias to [% terms.abug %] nor an alias to [% terms.abug %]
[% END %]. [% END %].
[% ELSE %] [% ELSE %]
@ -1957,7 +1957,7 @@
[% admindocslinks = {'useradmin.html' => 'User administration'} %] [% admindocslinks = {'useradmin.html' => 'User administration'} %]
The user you want to delete is set up as the default [% terms.bug %] The user you want to delete is set up as the default [% terms.bug %]
assignee assignee
[% IF Param('useqacontact') %] [% IF Bugzilla.get_field('qa_contact').enabled %]
or QA contact or QA contact
[% END %] [% END %]
for at least one component. for at least one component.

View File

@ -93,7 +93,7 @@ document.write(' <input type="button" name="check_all" value="Check All" onclick
</tr> </tr>
<tr> <tr>
[% IF Param('useplatform') %] [% IF Bugzilla.get_field('rep_platform').enabled %]
[% INCLUDE bug/field.html.tmpl [% INCLUDE bug/field.html.tmpl
field = bug_fields.rep_platform field = bug_fields.rep_platform
editable = 1 editable = 1
@ -114,7 +114,7 @@ document.write(' <input type="button" name="check_all" value="Check All" onclick
</tr> </tr>
<tr> <tr>
[% IF Param('useopsys') %] [% IF Bugzilla.get_field('op_sys').enabled %]
[% INCLUDE bug/field.html.tmpl [% INCLUDE bug/field.html.tmpl
field = bug_fields.op_sys field = bug_fields.op_sys
editable = 1 editable = 1
@ -124,7 +124,7 @@ document.write(' <input type="button" name="check_all" value="Check All" onclick
%] %]
[% END %] [% END %]
[% IF Param("usetargetmilestone") %] [% IF Bugzilla.get_field('target_milestone').enabled %]
[% INCLUDE bug/field.html.tmpl [% INCLUDE bug/field.html.tmpl
field = bug_fields.target_milestone field = bug_fields.target_milestone
editable = 1 editable = 1
@ -179,7 +179,7 @@ document.write(' <input type="button" name="check_all" value="Check All" onclick
</td> </td>
</tr> </tr>
[% IF Param("useqacontact") %] [% IF Bugzilla.get_field('qa_contact').enabled %]
<tr> <tr>
<th><label for="qa_contact">QA Contact:</label></th> <th><label for="qa_contact">QA Contact:</label></th>
<td colspan="3"> <td colspan="3">
@ -264,7 +264,7 @@ document.write(' <input type="button" name="check_all" value="Check All" onclick
</td> </td>
</tr> </tr>
[% IF Param('usestatuswhiteboard') %] [% IF Bugzilla.get_field('status_whiteboard').enabled %]
<tr> <tr>
<td align="right"> <td align="right">
<b>Status Whiteboard:</b> <b>Status Whiteboard:</b>
@ -275,7 +275,6 @@ document.write(' <input type="button" name="check_all" value="Check All" onclick
</tr> </tr>
[% END %] [% END %]
[% USE Bugzilla %]
[% FOREACH f = tweak_custom_fields %] [% FOREACH f = tweak_custom_fields %]
<tr> <tr>
[% INCLUDE bug/field.html.tmpl [% INCLUDE bug/field.html.tmpl

View File

@ -27,7 +27,6 @@
[%############################################################################%] [%############################################################################%]
[% DEFAULT title = "$terms.Bug List" %] [% DEFAULT title = "$terms.Bug List" %]
[% USE Bugzilla %]
[%############################################################################%] [%############################################################################%]
[%# Bug Table #%] [%# Bug Table #%]

View File

@ -79,7 +79,7 @@
</tr><tr class="bz_feed_severity"> </tr><tr class="bz_feed_severity">
<td>[% columns.bug_severity.title FILTER html %] </td> <td>[% columns.bug_severity.title FILTER html %] </td>
<td>[% bug.bug_severity FILTER html %]</td> <td>[% bug.bug_severity FILTER html %]</td>
[% IF Param("usetargetmilestone") %] [% IF Bugzilla.get_field('target_milestone').enabled %]
</tr><tr class="bz_feed_target_milestone"> </tr><tr class="bz_feed_target_milestone">
<td>[% columns.target_milestone.title FILTER html %]</td> <td>[% columns.target_milestone.title FILTER html %]</td>
<td>[% bug.target_milestone FILTER html %]</td> <td>[% bug.target_milestone FILTER html %]</td>

View File

@ -36,7 +36,6 @@
# by the browser. # by the browser.
#%] #%]
[% USE Bugzilla %]
[% field_descs.short_short_desc = field_descs.short_desc %] [% field_descs.short_short_desc = field_descs.short_desc %]
[% field_descs.assigned_to_realname = field_descs.assigned_to %] [% field_descs.assigned_to_realname = field_descs.assigned_to %]
[% field_descs.reporter_realname = field_descs.reporter %] [% field_descs.reporter_realname = field_descs.reporter %]

View File

@ -3,8 +3,6 @@
<html><body> <html><body>
[% USE Bugzilla %]
[% fileX = BLOCK %] [% fileX = BLOCK %]
<td id="cont_XXX"><input type="file" id="data_XXX" name="attachmulti_data_XXX" onchange="att_file_onchange(this)" /></td> <td id="cont_XXX"><input type="file" id="data_XXX" name="attachmulti_data_XXX" onchange="att_file_onchange(this)" /></td>
<td><input type="text" id="description_XXX" name="attachmulti_description_XXX" style="width: 20em" onchange="this._changed=true" /></td> <td><input type="text" id="description_XXX" name="attachmulti_description_XXX" style="width: 20em" onchange="this._changed=true" /></td>

View File

@ -262,7 +262,7 @@ This field describes the impact of [% terms.abug %].
<td>Request for enhancement</td> <td>Request for enhancement</td>
</table> </table>
[% IF Param('useplatform') %] [% IF Bugzilla.get_field('rep_platform').enabled %]
<h2><a name="rep_platform">Platform</a></h2> <h2><a name="rep_platform">Platform</a></h2>
This is the hardware platform against which the [% terms.bug %] was This is the hardware platform against which the [% terms.bug %] was
reported. Legal platforms include: reported. Legal platforms include:
@ -282,7 +282,7 @@ marked as occurring on all platforms, i.e. are designated
<em>All</em>. <em>All</em>.
[% END %] [% END %]
[% IF Param('useopsys') %] [% IF Bugzilla.get_field('op_sys').enabled %]
<h2><a name="op_sys">Operating System</a></h2> <h2><a name="op_sys">Operating System</a></h2>
This is the operating system against which the [% terms.bug %] was This is the operating system against which the [% terms.bug %] was
reported. Legal operating systems include: reported. Legal operating systems include:
@ -316,7 +316,7 @@ When searching for [% terms.bugs %] that have been resolved or
verified, remember to set the status field appropriately. verified, remember to set the status field appropriately.
</p> </p>
[% IF Param("use_see_also") %] [% IF Bugzilla.get_field('see_also').enabled %]
<h2><a name="see_also"></a>See Also</h2> <h2><a name="see_also"></a>See Also</h2>
<p>This allows you to refer to [% terms.bugs %] in other installations. <p>This allows you to refer to [% terms.bugs %] in other installations.

View File

@ -1,8 +1,6 @@
[%# Author: Vitaliy Filippov <vitalif@mail.ru> [%# Author: Vitaliy Filippov <vitalif@mail.ru>
# License: Dual-license GPL 3.0+ or MPL 1.1+ %] # License: Dual-license GPL 3.0+ or MPL 1.1+ %]
[% USE Bugzilla %]
[% cgi = Bugzilla.cgi %]
<html id="cmthtm" style="overflow: hidden"> <html id="cmthtm" style="overflow: hidden">
<head> <head>
<style type="text/css"> <style type="text/css">
@ -15,7 +13,7 @@
</head> </head>
<body style="margin: 0; padding: 0; overflow: hidden"> <body style="margin: 0; padding: 0; overflow: hidden">
<div class="bz_comment" style="border-style: dotted; border-width: 2px; border-color: #969696; background-color: #e8e8e8; padding: 5px"> <div class="bz_comment" style="border-style: dotted; border-width: 2px; border-color: #969696; background-color: #e8e8e8; padding: 5px">
<div class="bz_comment_text[% ' bz_fullscreen_comment' IF user.settings.comment_width.value == 'on' %]">[%- cgi.param("comment") | quoteUrls | wrap_comment | links_targetblank -%]</div> <div class="bz_comment_text[% ' bz_fullscreen_comment' IF user.settings.comment_width.value == 'on' %]">[%- Bugzilla.cgi.param("comment") | quoteUrls | wrap_comment | links_targetblank -%]</div>
</div> </div>
</body> </body>
<script type="text/javascript"> <script type="text/javascript">

View File

@ -24,8 +24,6 @@
onload = 'document.forms[\'f\'].quicksearch.focus()' onload = 'document.forms[\'f\'].quicksearch.focus()'
%] %]
[% USE Bugzilla %]
<p>Type in one or more words (or pieces of words) to search for:</p> <p>Type in one or more words (or pieces of words) to search for:</p>
<form name="f" action="buglist.cgi" method="get" <form name="f" action="buglist.cgi" method="get"
@ -44,14 +42,14 @@
[%+ field_descs.product FILTER html %], [%+ field_descs.product FILTER html %],
[%+ field_descs.component FILTER html %], [%+ field_descs.component FILTER html %],
[%+ IF use_keywords %][%+ field_descs.keywords FILTER html %],[% END %] [%+ IF use_keywords %][%+ field_descs.keywords FILTER html %],[% END %]
[%+ IF Param('usebugaliases') %][% field_descs.alias FILTER html %],[% END %] [%+ IF Bugzilla.get_field('alias').enabled %][% field_descs.alias FILTER html %],[% END %]
[%+ field_descs.short_desc FILTER html %], [%+ field_descs.short_desc FILTER html %],
[%+ IF Param('usestatuswhiteboard') %][% field_descs.status_whiteboard FILTER html %],[% END %] [%+ IF Bugzilla.get_field('status_whiteboard').enabled %][% field_descs.status_whiteboard FILTER html %],[% END %]
and [% field_descs.longdesc FILTER html %] fields for your word or words.</li> and [% field_descs.longdesc FILTER html %] fields for your word or words.</li>
<li>Typing just a <strong>number</strong> in the search box will take <li>Typing just a <strong>number</strong> in the search box will take
you directly to the [% terms.bug %] with that ID. you directly to the [% terms.bug %] with that ID.
[% IF Param('usebugaliases') %] [% IF Bugzilla.get_field('alias').enabled %]
Also, just typing the <strong>alias</strong> of [% terms.abug %] Also, just typing the <strong>alias</strong> of [% terms.abug %]
will take you to that [% terms.bug %]. will take you to that [% terms.bug %].
[% END %] [% END %]
@ -259,7 +257,7 @@
<strong>#</strong><em>value</em> <strong>#</strong><em>value</em>
</td> </td>
</tr> </tr>
[% IF Param('usestatuswhiteboard') %] [% IF Bugzilla.get_field('status_whiteboard').enabled %]
<tr> <tr>
<td class="field_name">[% field_descs.short_desc FILTER html %] <td class="field_name">[% field_descs.short_desc FILTER html %]
or [% field_descs.status_whiteboard FILTER html %]</td> or [% field_descs.status_whiteboard FILTER html %]</td>

View File

@ -1,382 +0,0 @@
[%# 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.
#
# Contributor(s): N.N.
# Marc Schumann <wurblzap@gmail.com>
#%]
[% INCLUDE global/header.html.tmpl
title = "$terms.Bugzilla QuickSearch (for Hackers)",
style = 'th {text-align: left}'
onload = 'document.forms[\'f\'].quicksearch.focus()'
%]
<p>
Type in one or more words (or word fragments) to search for:
</p>
<form name="f" action="buglist.cgi" method="get"
onsubmit="if (this.quicksearch.value == '')
{ alert('Please enter one or more search terms first.');
return false; } return true;">
<input type="text" size="40" name="quicksearch">
<input type="submit" value="Find" id="find">
<input type="submit" name="load" value="Load Search Form" id="load">
</form>
<p>
This is a case-insensitive &ldquo;all words as substrings&rdquo; search;
words are separated by spaces.
By default, the following fields are relevant: Summary, Keywords,
Product, Component, Status Whiteboard.
If a word looks like a part of a URL, that field is included in the search,
too.
</p>
<p>
The generic format for a &ldquo;word&rdquo; is
<tt>field1,&hellip;,fieldN:value1,&hellip;,valueM</tt>.
A [% terms.bug %] qualifies if at least one of the values occurs as a
substring in at least one of the fields.
For example, <tt>assignee,reporter,qa:ibm,sun</tt> will give you
[%+ terms.bugs %] where the assignee, reporter, or qa contact has a login
that contains <tt>ibm</tt> or <tt>sun</tt>.
If only <tt>value1,&hellip;,valueM</tt> is given, the prefix (roughly) defaults to
<tt>summary,keywords,product,component,statuswhiteboard:</tt> as noted above.
You can use <tt>-<i>word</i></tt> to express the logical negation of
<tt><i>word</i></tt>.
</p>
<p>
Here is a complete listing of available fields (the Shortcut column is just
for access speed):
</p>
<table border="1">
<thead>
<tr>
<th>Searched by default</th>
<th>Shortcut</th>
<th>Field Name</th>
<th>Aliases</th>
<th>Description</th>
</tr>
</thead>
<!-- Status, Resolution, Platform, OS, Priority, Severity -->
<tr>
<td>&nbsp;</td>
<td rowspan="2">
<tt>UNCO,NEW,&hellip;,CLOS,<br>FIX,DUP,&hellip;<i>(as first word)</i></tt>
</td>
<td><tt>status</tt></td>
<td>&nbsp;</td>
<td>
<a href="page.cgi?id=fields.html#status">Status</a>
<i>(&ldquo;bug_status&rdquo;)</i>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><tt>resolution</tt></td>
<td>&nbsp;</td>
<td><a href="page.cgi?id=fields.html#resolution">Resolution</a></td>
</tr>
[% IF Param('useplatform') %]
<tr>
<td>&nbsp;</td>
<td><i>as-is</i></td>
<td><tt>platform</tt></td>
<td>&nbsp;</td>
<td>
<a href="page.cgi?id=fields.html#rep_platform">Platform</a>
<i>(&ldquo;rep_platform&rdquo;)</i>
</td>
</tr>
[% END %]
[% IF Param('useopsys') %]
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><tt>os</tt></td>
<td><tt>opsys</tt></td>
<td>
<a href="page.cgi?id=fields.html#op_sys">OS</a>
<i>(&ldquo;op_sys&rdquo;)</i>
</td>
</tr>
[% END %]
<tr>
<td>&nbsp;</td>
<td><tt>p1,p2</tt> <i>or</i> <tt>p1-2</tt></td>
<td><tt>priority</tt></td>
<td><tt>pri</tt></td>
<td><a href="page.cgi?id=fields.html#priority">Priority</a></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><tt>blo,cri,&hellip;,enh</tt></td>
<td><tt>severity</tt></td>
<td><tt>sev</tt></td>
<td>
<a href="page.cgi?id=fields.html#bug_severity">Severity</a>
<i>(&ldquo;bug_severity&rdquo;)</i>
</td>
</tr>
<!-- People: AssignedTo, Reporter, QA Contact, CC, Added comment -->
<!-- Added comment is missing!!!! -->
<tr>
<td>&nbsp;</td>
<td><b>@</b><i>assignee</i></td>
<td><tt>assignedto</tt></td>
<td><tt>assignee</tt></td>
<td>
<a href="page.cgi?id=fields.html#assigned_to">Assignee</a>
<i>(&ldquo;assigned_to&rdquo;)</i>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><tt>reporter</tt></td>
<td><tt>rep</tt></td>
<td>Reporter (login)</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><tt>qa</tt></td>
<td><tt>qacontact</tt></td>
<td>QA Contact (login) <i>(&ldquo;qa_contact&rdquo;)</i></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><tt>cc</tt></td>
<td>&nbsp;</td>
<td>CC (login)</td>
</tr>
<!-- Product, Version, Component, Target Milestone -->
<tr>
<td><i>yes</i></td>
<td rowspan="2"><b>:</b><i>area</i></td>
<td><tt>product</tt></td>
<td><tt>prod</tt></td>
<td>Product (enum)</td>
</tr>
<tr>
<td><i>yes</i></td>
<td><tt>component</tt></td>
<td><tt>comp</tt></td>
<td><a href="describecomponents.cgi">Component</a></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><tt>version</tt></td>
<td><tt>ver</tt></td>
<td>Version (enum)</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><tt>milestone</tt></td>
<td><tt>target, targetmilestone</tt></td>
<td>Target Milestone <i>(&ldquo;target_milestone&rdquo;)</i></td>
</tr>
<!-- Summary, Description, URL, Status whiteboard, Keywords -->
<tr>
<td><i>yes</i></td>
<td>&nbsp;</td>
<td><tt>summary</tt></td>
<td><tt>shortdesc</tt></td>
<td>
[% terms.Bug %] Summary (short text)
<i>(&ldquo;short_desc&rdquo;)</i>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><tt>description</tt></td>
<td><tt>desc, longdesc<!--, comment--></tt></td>
<!-- reserve "comment" for "added comment" login search?! -->
<td>[% terms.Bug %] Description / Comments (long text)</td>
</tr>
<tr>
<td><i>depends</i></td>
<td>&nbsp;</td>
<td><tt>url</tt></td>
<td>&nbsp;</td>
<td>URL <i>(&ldquo;bug_file_loc&rdquo;)</i></td>
</tr>
<tr>
<td><i>yes</i></td>
<td>&nbsp;</td>
<td><tt>statuswhiteboard</tt></td>
<td><tt>sw, whiteboard</tt></td>
<td>Status Whiteboard <i>(&ldquo;status_whiteboard&rdquo;)</i></td>
</tr>
<tr>
<td><i>yes</i></td>
<td><b>!</b><i>keyword</i></td>
<td><tt>keywords</tt></td>
<td><tt>kw</tt></td>
<td><a href="describekeywords.cgi">Keywords</a></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><tt>group</tt></td>
<td>&nbsp;</td>
<td>Group</td>
</tr>
<!-- Flags -->
<tr>
<td>&nbsp;</td>
<td rowspan="2"><i>flag</i><b>?</b><i>requestee</i></td>
<td><tt>flag</tt></td>
<td>&nbsp;</td>
<td>Flag name and status (+, - or ?)</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><tt>requestee</tt></td>
<td><tt>req</tt></td>
<td>Flag requestee (login)</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><tt>setter</tt></td>
<td><tt>set</tt></td>
<td>Flag setter (login)</td>
</tr>
<!-- Attachments -->
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><tt>attachmentdesc</tt></td>
<td><tt>attachdesc</tt></td>
<td>
Attachment Description
<i>(&ldquo;attachments.description&rdquo;)</i>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><tt>attachmentmimetype</tt></td>
<td><tt>attachmimetype</tt></td>
<td>Attachment mime-type <i>(&ldquo;attachments.mimetype&rdquo;)</i></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><tt>votes</tt></td>
<td>&nbsp;</td>
<td>
Number of votes<br>
(votes:<i>N</i> and votes&gt;=<i>N</i> mean "at least N votes",
votes&gt;<i>N</i> means "more than N votes")
</td>
</tr>
</table>
<p>
Examples for some useful abbreviations:
</p>
<table border="1">
<thead>
<tr>
<th>Syntax</th>
<th>Semantics and Examples</th>
</tr>
</thead>
<!--
<tr>
<td><i>STAT</i> <i>(as first word)</i></td>
<td><b>status,resolution:</b> <i>STAT</i></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td><tt>ALL</tt> <i>(as first word)</i></td>
<td><i>include all resolved [% terms.bugs %] in your search</i></td>
</tr>
<tr>
<td><tt>+DUP,FIXED</tt> <i>(as first word)</i></td>
<td><i>include DUPLICATE and FIXED [% terms.bugs %] in your search</i></td>
</tr>
-->
<tr>
<td><b>:</b><i>area</i></td>
<td><b>product,component:</b><i>area</i></td>
</tr>
<tr>
<td><i>sev</i></td>
<td><b>severity:</b><i>sev</i></td>
</tr>
<tr>
<td><tt>blo,cri,maj</tt></td>
<td><i>severe [% terms.bugs %]</i></td>
</tr>
<tr>
<td><tt>enh</tt></td>
<td><i>enhancement requests</i></td>
</tr>
<tr>
<td><b>p</b><i>level</i></td>
<td><b>priority:</b><i>level</i></td>
</tr>
<tr>
<td><tt>p1</tt></td>
<td><i>very high-priority [% terms.bugs %]</i></td>
</tr>
<tr>
<td><tt>p1-2</tt></td>
<td><i>high-priority [% terms.bugs %]</i></td>
</tr>
<tr>
<td><b>@</b><i>assignee</i></td>
<td><b>assignedto:</b><i>assignee</i></td>
</tr>
<tr>
<td><b>!</b><i>keyword</i></td>
<td><b>keywords:</b><i>keyword</i></td>
</tr>
<tr>
<td><i>flag</i><b>?</b><i>requestee</i></td>
<td><b>flag:</b><i>flag?</i> <b>requestee:</b><i>requestee</i></td>
</tr>
</table>
<p>
More information can be found in the
<a href="page.cgi?id=quicksearch.html#features">&ldquo;Features&rdquo;</a>
section on the <a href="page.cgi?id=quicksearch.html">introductory page</a>.
</p>
[% PROCESS global/footer.html.tmpl %]

View File

@ -33,7 +33,7 @@
title = title title = title
%] %]
[% IF Param("useqacontact") %] [% IF Bugzilla.get_field('qa_contact').enabled %]
[% numcols = 3 %] [% numcols = 3 %]
[% ELSE %] [% ELSE %]
[% numcols = 2 %] [% numcols = 2 %]
@ -54,7 +54,7 @@
<th>&nbsp;</th> <th>&nbsp;</th>
<th>Description</th> <th>Description</th>
<th>Default Assignee</th> <th>Default Assignee</th>
[% IF Param("useqacontact") %] [% IF Bugzilla.get_field('qa_contact').enabled %]
<th>Default QA Contact</th> <th>Default QA Contact</th>
[% END %] [% END %]
</tr> </tr>
@ -67,7 +67,7 @@
</tbody> </tbody>
</table> </table>
[% IF Param("useclassification") %] [% IF Bugzilla.get_field('classification').enabled %]
<p><a href="describecomponents.cgi?classification=[% product.classification_obj.name | uri %]">View other products of classification <b>[% product.classification_obj.name | html %]</b></a></p> <p><a href="describecomponents.cgi?classification=[% product.classification_obj.name | uri %]">View other products of classification <b>[% product.classification_obj.name | html %]</b></a></p>
[% END %] [% END %]
<p><a href="describecomponents.cgi">View other products</a></p> <p><a href="describecomponents.cgi">View other products</a></p>
@ -93,7 +93,7 @@
<td class="component_assignee"> <td class="component_assignee">
[% INCLUDE global/user.html.tmpl who = comp.default_assignee %] [% INCLUDE global/user.html.tmpl who = comp.default_assignee %]
</td> </td>
[% IF Param("useqacontact") %] [% IF Bugzilla.get_field('qa_contact').enabled %]
<td class="component_qa_contact"> <td class="component_qa_contact">
[% INCLUDE global/user.html.tmpl who = comp.default_qa_contact %] [% INCLUDE global/user.html.tmpl who = comp.default_qa_contact %]
</td> </td>

View File

@ -47,8 +47,8 @@
{ name => "bug_severity", description => field_descs.bug_severity }, { name => "bug_severity", description => field_descs.bug_severity },
] %] ] %]
[% columns.push({ name => "op_sys", description => field_descs.op_sys }) IF Param('useopsys') %] [% columns.push({ name => "op_sys", description => field_descs.op_sys }) IF Bugzilla.get_field('op_sys').enabled %]
[% columns.push({ name => "target_milestone", description => field_descs.target_milestone }) %] [% columns.push({ name => "target_milestone", description => field_descs.target_milestone }) IF Bugzilla.get_field('target_milestone').enabled %]
[% columns.push({ name => "short_desc", description => field_descs.short_desc }) %] [% columns.push({ name => "short_desc", description => field_descs.short_desc }) %]
[% SET base_args = [] %] [% SET base_args = [] %]
@ -107,7 +107,7 @@
<td class="bug_severity"> <td class="bug_severity">
[%- bug.bug_severity_obj.name FILTER html IF bug.bug_severity %] [%- bug.bug_severity_obj.name FILTER html IF bug.bug_severity %]
</td> </td>
[% IF Param('useopsys') %] [% IF Bugzilla.get_field('op_sys').enabled %]
<td class="op_sys"> <td class="op_sys">
[%- bug.op_sys_obj.name FILTER html IF bug.op_sys %] [%- bug.op_sys_obj.name FILTER html IF bug.op_sys %]
</td> </td>

View File

@ -7,7 +7,6 @@
# You need to fulfill the interface to report-table.html.tmpl. # You need to fulfill the interface to report-table.html.tmpl.
#%] #%]
[% USE Bugzilla %]
<html> <html>
[% title = "$terms.Bug Report" %] [% title = "$terms.Bug Report" %]
<head> <head>

View File

@ -52,7 +52,7 @@ Subject: [% flagtype_name %] [%+ subject_status %]: [[% terms.Bug %] [%+ bug.bug
[%- IF attachment %] : [%- IF attachment %] :
[Attachment [% attachment.id %]] [% attachment.description FILTER clean_text %][% END %] [Attachment [% attachment.id %]] [% attachment.description FILTER clean_text %][% END %]
X-Bugzilla-Type: request X-Bugzilla-Type: request
[% IF Param('useclassification') %] [% IF Bugzilla.get_field('classification').enabled %]
X-Bugzilla-Classification: [% bug.classification %] X-Bugzilla-Classification: [% bug.classification %]
[% END %] [% END %]
X-Bugzilla-Product: [% bug.product %] X-Bugzilla-Product: [% bug.product %]
@ -71,7 +71,7 @@ X-Bugzilla-Priority: [% bug.priority_obj.name %]
[% IF bug.assigned_to %] [% IF bug.assigned_to %]
X-Bugzilla-Assigned-To: [% bug.assigned_to.email %] X-Bugzilla-Assigned-To: [% bug.assigned_to.email %]
[% END %] [% END %]
[% IF Param('useqacontact') AND bug.qa_contact %] [% IF Bugzilla.get_field('qa_contact').enabled AND bug.qa_contact %]
X-Bugzilla-QA-Contact: [% bug.qa_contact.email %] X-Bugzilla-QA-Contact: [% bug.qa_contact.email %]
[% END %] [% END %]
[% IF bug.target_milestone %] [% IF bug.target_milestone %]

View File

@ -34,7 +34,7 @@
var last_sel = []; // Caches last selection var last_sel = []; // Caches last selection
var cpts = new Array(); var cpts = new Array();
[% n = 1 %] [% n = 1 %]
[% IF Param('useclassification') %] [% IF Bugzilla.get_field('classification').enabled %]
[% FOREACH clas = user.get_selectable_classifications %] [% FOREACH clas = user.get_selectable_classifications %]
[% FOREACH prod = user.get_selectable_products(clas.id) %] [% FOREACH prod = user.get_selectable_products(clas.id) %]
[%+ PROCESS js_comp %] [%+ PROCESS js_comp %]
@ -72,7 +72,7 @@ to some group are shown by default.
<td> <td>
<select name="product" onchange="selectProduct(this, this.form.component, null, null, 'Any');"> <select name="product" onchange="selectProduct(this, this.form.component, null, null, 'Any');">
<option value="">Any</option> <option value="">Any</option>
[% IF Param('useclassification') %] [% IF Bugzilla.get_field('classification').enabled %]
[% FOREACH c = user.get_selectable_classifications %] [% FOREACH c = user.get_selectable_classifications %]
<optgroup label="[% c.name FILTER html %]"> <optgroup label="[% c.name FILTER html %]">
[% FOREACH p = user.get_selectable_products(c.id) %] [% FOREACH p = user.get_selectable_products(c.id) %]

View File

@ -20,8 +20,6 @@
# Gervase Markham <gerv@gerv.net> # Gervase Markham <gerv@gerv.net>
#%] #%]
[% USE Bugzilla %]
<script type="text/javascript" src="js/query-visibility.js"></script> <script type="text/javascript" src="js/query-visibility.js"></script>
<script type="text/javascript" src="js/field.js"></script> <script type="text/javascript" src="js/field.js"></script>
<script type="text/javascript" src="fieldvaluecontrol.cgi?user=[% Bugzilla.user.id %]"></script> <script type="text/javascript" src="fieldvaluecontrol.cgi?user=[% Bugzilla.user.id %]"></script>
@ -68,7 +66,7 @@
<table> <table>
<tr> <tr>
[% Hook.process('before_selects_top') %] [% Hook.process('before_selects_top') %]
[% IF Param('useclassification') %] [% IF Bugzilla.get_field('classification').enabled %]
<th align="left" valign="top" id="classification_cont"> <th align="left" valign="top" id="classification_cont">
<label for="classification">Classification</label>:<br /> <label for="classification">Classification</label>:<br />
[% PROCESS select sel = { name => 'classification', size => 5 } %] [% PROCESS select sel = { name => 'classification', size => 5 } %]
@ -86,8 +84,8 @@
<label for="version">Version</label>:<br /> <label for="version">Version</label>:<br />
[% PROCESS select sel = { name => 'version', size => 5 } %] [% PROCESS select sel = { name => 'version', size => 5 } %]
</th> </th>
[% IF Param('usetargetmilestone') %] [% IF Bugzilla.get_field('target_milestone').enabled %]
<th align="left" valign="top" id="target_milestone_cont"> <th align="left" valign="top" id="target_milestone_cont">
<label for="target_milestone">Target Milestone</label>:<br /> <label for="target_milestone">Target Milestone</label>:<br />
[% PROCESS select sel = { name => 'target_milestone', size => 5 } %] [% PROCESS select sel = { name => 'target_milestone', size => 5 } %]
</th> </th>
@ -214,13 +212,13 @@
<label for="priority" accesskey="i">Pr<u>i</u>ority</label>:<br /> <label for="priority" accesskey="i">Pr<u>i</u>ority</label>:<br />
[% PROCESS select sel = { name => 'priority', size => 7 } %] [% PROCESS select sel = { name => 'priority', size => 7 } %]
</th> </th>
[% IF Param('useplatform') %] [% IF Bugzilla.get_field('rep_platform').enabled %]
<th align="left" valign="top" id="rep_platform_cont"> <th align="left" valign="top" id="rep_platform_cont">
<label for="rep_platform" accesskey="h"><u>H</u>ardware</label>:<br /> <label for="rep_platform" accesskey="h"><u>H</u>ardware</label>:<br />
[% PROCESS select sel = { name => 'rep_platform', size => 7 } %] [% PROCESS select sel = { name => 'rep_platform', size => 7 } %]
</th> </th>
[% END %] [% END %]
[% IF Param('useopsys') %] [% IF Bugzilla.get_field('op_sys').enabled %]
<th align="left" valign="top" id="op_sys_cont"> <th align="left" valign="top" id="op_sys_cont">
<label for="op_sys" accesskey="o"><u>O</u>S</label>:<br /> <label for="op_sys" accesskey="o"><u>O</u>S</label>:<br />
[% PROCESS select sel = { name => 'op_sys', size => 7 } %] [% PROCESS select sel = { name => 'op_sys', size => 7 } %]
@ -238,7 +236,7 @@
<fieldset> <fieldset>
<legend> <legend>
<strong> <strong>
[% IF Param('usevotes') %] [% IF Bugzilla.get_field('votes').enabled %]
Email Addresses, [% terms.Bug %] Numbers, and Votes Email Addresses, [% terms.Bug %] Numbers, and Votes
[% ELSE %] [% ELSE %]
Email Addresses and [% terms.Bug %] Numbers Email Addresses and [% terms.Bug %] Numbers
@ -278,7 +276,7 @@
</label> </label>
</td> </td>
</tr> </tr>
[% IF Param('useqacontact') %] [% IF Bugzilla.get_field('qa_contact').enabled %]
<tr> <tr>
<td> <td>
<input type="checkbox" name="emailqa_contact[% n %]" <input type="checkbox" name="emailqa_contact[% n %]"
@ -353,7 +351,7 @@
<td></td> <td></td>
<td>(comma-separated list)</td> <td>(comma-separated list)</td>
</tr> </tr>
[% IF Param('usevotes') %] [% IF Bugzilla.get_field('votes').enabled %]
<tr> <tr>
<td align="right"> <td align="right">
<label for="votes">Only [% terms.bugs %] with at least</label>: <label for="votes">Only [% terms.bugs %] with at least</label>:

View File

@ -24,9 +24,6 @@
# search/boolean-charts.html.tmpl. # search/boolean-charts.html.tmpl.
#%] #%]
[% USE Bugzilla %]
[% cgi = Bugzilla.cgi %]
[% js_data = BLOCK %] [% js_data = BLOCK %]
var queryform = "queryform" var queryform = "queryform"
[% END %] [% END %]
@ -49,7 +46,7 @@ var queryform = "queryform"
[%# The decent help requires Javascript %] [%# The decent help requires Javascript %]
<script type="text/javascript"> <!-- <script type="text/javascript"> <!--
[% IF NOT cgi.param("help") %] [% IF NOT Bugzilla.cgi.param("help") %]
document.write("<p><a href='query.cgi?help=1&amp;format=advanced'>Give me some help<\/a> (reloads page).<\/p>"); document.write("<p><a href='query.cgi?help=1&amp;format=advanced'>Give me some help<\/a> (reloads page).<\/p>");
[% ELSE %] [% ELSE %]
[% PROCESS "search/search-help.html.tmpl" %] [% PROCESS "search/search-help.html.tmpl" %]

View File

@ -17,91 +17,91 @@
# #
# Contributor(s): Gervase Markham <gerv@gerv.net> # Contributor(s): Gervase Markham <gerv@gerv.net>
#%] #%]
[% help_html = [ [% help_html = [
{ id => "short_desc_type", { id => "short_desc_type",
html => "The type of summary search you would like" }, html => "The type of summary search you would like" },
{ id => "short_desc", { id => "short_desc",
html => "The $terms.bug summary is a short sentence which succinctly html => "The $terms.bug summary is a short sentence which succinctly
describes <br> what the $terms.bug is about." }, describes <br> what the $terms.bug is about." },
{ id => "classification", { id => "classification",
html => "$terms.Bugs are categorised into Classifications, Products and Components. classifications is the<br> html => "$terms.Bugs are categorised into Classifications, Products and Components. classifications is the<br>
top-level categorisation." }, top-level categorisation." },
{ id => "product", { id => "product",
html => Param('useclassification') ? html => Bugzilla.get_field('classification').enabled ?
"$terms.Bugs are categorised into Products and Components. Select a Classification to narrow down this list" : "$terms.Bugs are categorised into Products and Components. Select a Classification to narrow down this list" :
"$terms.Bugs are categorised into Products and Components. Product is "$terms.Bugs are categorised into Products and Components. Product is
the<br>top-level categorisation." }, the<br>top-level categorisation." },
{ id => "component", { id => "component",
html => "Components are second-level categories; each belongs to a<br> html => "Components are second-level categories; each belongs to a<br>
particular Product. Select a Product to narrow down this list." }, particular Product. Select a Product to narrow down this list." },
{ id => "version", { id => "version",
html => "The version field defines the version of the software the html => "The version field defines the version of the software the
$terms.bug<br>was found in." }, $terms.bug<br>was found in." },
{ id => "target_milestone", { id => "target_milestone",
html => "The target_milestone field is used to define when the engineer<br> html => "The target_milestone field is used to define when the engineer<br>
the $terms.bug is assigned to expects to fix it." }, the $terms.bug is assigned to expects to fix it." },
{ id => "longdesc", { id => "longdesc",
html => "$terms.Bugs have comments added to them by $terms.Bugzilla users. html => "$terms.Bugs have comments added to them by $terms.Bugzilla users.
You can<br>search for some text in those comments." }, You can<br>search for some text in those comments." },
{ id => "longdesc_type", { id => "longdesc_type",
html => "The type of comment search you would like" }, html => "The type of comment search you would like" },
{ id => "bug_file_loc", { id => "bug_file_loc",
html => "$terms.Bugs can have a URL associated with them - for example, a html => "$terms.Bugs can have a URL associated with them - for example, a
pointer<br>to a web site where the problem is seen." }, pointer<br>to a web site where the problem is seen." },
{ id => "bug_file_loc_type", { id => "bug_file_loc_type",
html => "The type of URL search you would like" }, html => "The type of URL search you would like" },
{ id => "status_whiteboard", { id => "status_whiteboard",
html => "Each $terms.bug has a free-form single line text entry box for html => "Each $terms.bug has a free-form single line text entry box for
adding<br>tags and status information." }, adding<br>tags and status information." },
{ id => "status_whiteboard_type", { id => "status_whiteboard_type",
html => "The type of whiteboard search you would like" }, html => "The type of whiteboard search you would like" },
{ id => "keywords", { id => "keywords",
html => "You can add keywords from a defined list to $terms.bugs, in order html => "You can add keywords from a defined list to $terms.bugs, in order
to<br>tag and group them." }, to<br>tag and group them." },
{ id => "keywords_type", { id => "keywords_type",
html => "The type of keyword search you would like" }, html => "The type of keyword search you would like" },
{ id => "bug_status", { id => "bug_status",
html => "$terms.Abug may be in any of a number of states." }, html => "$terms.Abug may be in any of a number of states." },
{ id => "resolution", { id => "resolution",
html => "If $terms.abug is in a resolved state, then one of these reasons html => "If $terms.abug is in a resolved state, then one of these reasons
will<br>be given for its resolution." }, will<br>be given for its resolution." },
{ id => "bug_severity", { id => "bug_severity",
html => "How severe the $terms.bug is, or whether it's an enhancement." }, html => "How severe the $terms.bug is, or whether it's an enhancement." },
{ id => "priority", { id => "priority",
html => "Engineers prioritize their $terms.bugs using this field." }, html => "Engineers prioritize their $terms.bugs using this field." },
{ id => "rep_platform", { id => "rep_platform",
html => "The hardware platform the $terms.bug was observed on." }, html => "The hardware platform the $terms.bug was observed on." },
{ id => "op_sys", { id => "op_sys",
html => "The operating system the $terms.bug was observed on." }, html => "The operating system the $terms.bug was observed on." },
{ id => "email1", { id => "email1",
html => "Every $terms.bug has people associated with it in different html => "Every $terms.bug has people associated with it in different
roles.<br>Here, you can search on what people are in what role." }, roles.<br>Here, you can search on what people are in what role." },
{ id => "email2", { id => "email2",
html => "Every $terms.bug has people associated with it in different html => "Every $terms.bug has people associated with it in different
roles.<br>Here, you can search on what people are in what role." }, roles.<br>Here, you can search on what people are in what role." },
{ id => "bug_id", { id => "bug_id",
html => "You can limit your search to a specific set of $terms.bugs ." }, html => "You can limit your search to a specific set of $terms.bugs ." },
{ id => "votes", { id => "votes",
html => "Some $terms.bugs can be voted for, and you can limit your search to html => "Some $terms.bugs can be voted for, and you can limit your search to
$terms.bugs<br>with more than a certain number of votes." }, $terms.bugs<br>with more than a certain number of votes." },
{ id => "chfield", { id => "chfield",
html => "You can search for specific types of change - this field define <br> html => "You can search for specific types of change - this field define <br>
which field you are interested in changes for." }, which field you are interested in changes for." },
{ id => "chfieldfrom", { id => "chfieldfrom",
html => "Specify the start and end dates either in YYYY-MM-DD format<br> html => "Specify the start and end dates either in YYYY-MM-DD format<br>
(optionally followed by HH:mm, in 24 hour clock), or in relative<br> (optionally followed by HH:mm, in 24 hour clock), or in relative<br>
dates such as 1h, 2d, 3w, 4m, 5y, which respectively mean one hour,<br> dates such as 1h, 2d, 3w, 4m, 5y, which respectively mean one hour,<br>
two days, three weeks, four months, or five years ago. 0d is last<br> two days, three weeks, four months, or five years ago. 0d is last<br>
midnight, and 0h, 0w, 0m, 0y is the beginning of this hour, week,<br> midnight, and 0h, 0w, 0m, 0y is the beginning of this hour, week,<br>
month, or year." }, month, or year." },
{ id => "chfieldto", { id => "chfieldto",
html => "Specify the start and end dates either in YYYY-MM-DD format<br> html => "Specify the start and end dates either in YYYY-MM-DD format<br>
(optionally followed by HH:mm, in 24 hour clock), or in relative<br> (optionally followed by HH:mm, in 24 hour clock), or in relative<br>
dates such as 1h, 2d, 3w, 4m, 5y, which respectively mean one hour,<br> dates such as 1h, 2d, 3w, 4m, 5y, which respectively mean one hour,<br>
two days, three weeks, four months, or five years ago. 0d is last<br> two days, three weeks, four months, or five years ago. 0d is last<br>
midnight, and 0h, 0w, 0m, 0y is the beginning of this hour, week,<br> midnight, and 0h, 0w, 0m, 0y is the beginning of this hour, week,<br>
month, or year." }, month, or year." },
{ id => "chfieldvalue", { id => "chfieldvalue",
html => "The value the field defined above changed to during that time." }, html => "The value the field defined above changed to during that time." },
] %] ] %]

View File

@ -66,7 +66,7 @@ for "crash secure SSL flash".
<td> <td>
<select name="product" id="product"> <select name="product" id="product">
<option value="">All</option> <option value="">All</option>
[% IF Param('useclassification') %] [% IF Bugzilla.get_field('classification').enabled %]
[% FOREACH c = classification %] [% FOREACH c = classification %]
<optgroup label="[% c.name FILTER html %]"> <optgroup label="[% c.name FILTER html %]">
[% FOREACH p = user.get_selectable_products(c.id) %] [% FOREACH p = user.get_selectable_products(c.id) %]

View File

@ -73,7 +73,7 @@ function normal_keypress_handler( aEvent ) {
<text class="text-link" onclick="load_relative_url('enter_bug.cgi')" value="new [% terms.bug %]"/> <text class="text-link" onclick="load_relative_url('enter_bug.cgi')" value="new [% terms.bug %]"/>
<text class="text-link" onclick="load_relative_url('query.cgi')" value="new search"/> <text class="text-link" onclick="load_relative_url('query.cgi')" value="new search"/>
<text class="text-link" onclick="load_relative_url('report.cgi')" value="reports"/> <text class="text-link" onclick="load_relative_url('report.cgi')" value="reports"/>
[%- IF Param('usevotes') %] [%- IF Bugzilla.get_field('votes').enabled %]
<text class="text-link" onclick="load_relative_url('votes.cgi?action=show_user')" value="my votes"/> <text class="text-link" onclick="load_relative_url('votes.cgi?action=show_user')" value="my votes"/>
[%- END %] [%- END %]
[%- IF user.authorizer.can_logout %] [%- IF user.authorizer.can_logout %]
@ -91,7 +91,7 @@ function normal_keypress_handler( aEvent ) {
[%- IF user.in_group('editusers') || user.can_bless %] [%- IF user.in_group('editusers') || user.can_bless %]
<text class="text-link" onclick="load_relative_url('editusers.cgi')" value="edit users"/> <text class="text-link" onclick="load_relative_url('editusers.cgi')" value="edit users"/>
[%- END %] [%- END %]
[%- IF Param('useclassification') && user.in_group('editclassifications') %] [%- IF Bugzilla.get_field('classification').enabled && user.in_group('editclassifications') %]
<text class="text-link" onclick="load_relative_url('editclassifications.cgi')" value="edit classifications"/> <text class="text-link" onclick="load_relative_url('editclassifications.cgi')" value="edit classifications"/>
[%- END %] [%- END %]
[%- IF user.in_group('editcomponents') %] [%- IF user.in_group('editcomponents') %]

View File

@ -85,7 +85,7 @@ elsif ($action eq "show_user") {
show_user($bug_id); show_user($bug_id);
} }
elsif ($action eq "vote") { elsif ($action eq "vote") {
record_votes() if Bugzilla->params->{'usevotes'}; record_votes() if Bugzilla->get_field('votes')->enabled;
show_user($bug_id); show_user($bug_id);
} }
else { else {
@ -133,8 +133,7 @@ sub show_user {
my $who_id = $cgi->param('user_id') || $user->id; my $who_id = $cgi->param('user_id') || $user->id;
my $who = Bugzilla::User->check({ id => $who_id }); my $who = Bugzilla::User->check({ id => $who_id });
my $canedit = (Bugzilla->params->{'usevotes'} && $user->id == $who->id) my $canedit = (Bugzilla->get_field('votes')->enabled && $user->id == $who->id) ? 1 : 0;
? 1 : 0;
$dbh->bz_start_transaction(); $dbh->bz_start_transaction();