Bug 81185, Bug 70605 - Fix boolean chart <select>, remove duplicate short_desc, begin support of correlated target selection

git-svn-id: svn://svn.office.custis.ru/3rdparty/bugzilla.org/trunk@1301 6955db30-a419-402b-8a0d-67ecbb4d7f56
master
vfilippov 2011-07-21 14:19:36 +00:00
parent a50fa41f30
commit 90c96341e8
6 changed files with 55 additions and 293 deletions

View File

@ -754,6 +754,7 @@ sub _fill_fields_cache
my ($r) = @_;
if (!$r->{id})
{
# FIXME take field names from Bugzilla->messages
my $f = [ Bugzilla::Field->get_all ];
for (@$f)
{

View File

@ -42,15 +42,21 @@ $Bugzilla::messages->{en} = {
anywords => 'contains any of the words',
allwords => 'contains all of the words',
nowords => 'contains none of the words',
matches => 'matches',
notmatches => 'does not match',
insearch => 'matched by saved search',
notinsearch => 'not matched by saved search',
changedbefore => 'changed before',
changedafter => 'changed after',
changedfrom => 'changed from',
changedto => 'changed to',
changedby => 'changed by',
matches => 'matches',
notmatches => 'does not match',
insearch => 'matched by saved search',
notinsearch => 'not matched by saved search',
# Names with other_ prefix are used with correlated search terms
other_changedbefore => 'change $1 before',
other_changedafter => 'change $1 after',
other_changedfrom => 'change $1 from',
other_changedto => 'change $1 to',
other_changedby => 'change $1 by',
},
field_types => {
FIELD_TYPE_UNKNOWN() => 'Unknown Type',
@ -63,7 +69,6 @@ $Bugzilla::messages->{en} = {
FIELD_TYPE_NUMERIC() => 'Numeric',
},
field_descs => {
actual_time => 'Actual Hours',
alias => 'Alias',
assigned_to => 'Assignee',
blocked => 'Blocks',
@ -75,7 +80,6 @@ $Bugzilla::messages->{en} = {
cc => 'CC',
classification => 'Classification',
cclist_accessible => 'CC list accessible',
commenter => 'Commenter',
component_id => 'Component ID',
component => 'Component',
content => 'Content',
@ -90,7 +94,6 @@ $Bugzilla::messages->{en} = {
estimated_time => 'Orig. Est.',
everconfirmed => 'Ever confirmed',
keywords => 'Keywords',
longdesc => 'Comment',
newcc => 'CC',
op_sys => 'OS',
owner_idle_time => 'Time Since Assignee Touched',
@ -112,276 +115,12 @@ $Bugzilla::messages->{en} = {
target_milestone => 'Target Milestone',
version => 'Version',
votes => 'Votes',
work_time => 'Hours Worked',
interval_time => 'Period Worktime',
comment0 => 'First Comment',
'longdescs.isprivate' => 'Comment is private',
'attach_data.thedata' => 'Attachment data',
'attachments.description' => 'Attachment description',
'attachments.filename' => 'Attachment filename',
'attachments.mimetype' => 'Attachment mime type',
'attachments.ispatch' => 'Attachment is patch',
'attachments.isobsolete' => 'Attachment is obsolete',
'attachments.isprivate' => 'Attachment is private',
'attachments.isurl' => 'Attachment is a URL',
'attachments.submitter' => 'Attachment creator',
'flagtypes.name' => 'Flags',
'requestees.login_name' => 'Flag Requestee',
'setters.login_name' => 'Flag Setter',
},
};
__END__
#!/usr/bin/perl
package Bugzilla::Language::en;
use strict;
use Bugzilla::Constants;
my $terms = {
bug => 'bug',
Bug => 'Bug',
abug => 'a bug',
Abug => 'A bug',
aBug => 'a Bug',
ABug => 'A Bug',
bugs => 'bugs',
Bugs => 'Bugs',
zeroSearchResults => 'Zarro Boogs found',
Bugzilla => 'Bugzilla',
};
$Bugzilla::messages->{en} = {
terms => $terms,
operator_descs => {
not => 'NOT',
noop => '---',
equals => 'is equal to',
notequals => 'is not equal to',
anyexact => 'is equal to any of the strings',
substring => 'contains the string',
casesubstring => 'contains the string (exact case)',
notsubstring => 'does not contain the string',
anywordssubstr => 'contains any of the strings',
allwordssubstr => 'contains all of the strings',
nowordssubstr => 'contains none of the strings',
regexp => 'matches regular expression',
notregexp => 'does not match regular expression',
lessthan => 'is less than',
lessthaneq => 'is less than or equal to',
greaterthan => 'is greater than',
greaterthaneq => 'is greater than or equal to',
anywords => 'contains any of the words',
allwords => 'contains all of the words',
nowords => 'contains none of the words',
changedbefore => 'changed before',
changedafter => 'changed after',
changedfrom => 'changed from',
changedto => 'changed to',
changedby => 'changed by',
matches => 'matches',
notmatches => 'does not match',
insearch => 'matched by saved search',
notinsearch => 'not matched by saved search',
},
field_types => {
FIELD_TYPE_UNKNOWN => 'Unknown Type',
FIELD_TYPE_FREETEXT => 'Free Text',
FIELD_TYPE_SINGLE_SELECT => 'Drop Down',
FIELD_TYPE_MULTI_SELECT => 'Multiple-Selection Box',
FIELD_TYPE_TEXTAREA => 'Large Text Box',
FIELD_TYPE_DATETIME => 'Date/Time',
FIELD_TYPE_BUG_ID => $terms->{Bug}.' ID',
FIELD_TYPE_NUMERIC => 'Numeric',
},
field_descs => {
actual_time => 'Actual Hours',
alias => 'Alias',
assigned_to => 'Assignee',
blocked => 'Blocks',
bug_file_loc => 'URL',
bug_group => 'Group',
bug_id => $terms->{Bug}.' ID',
bug_severity => 'Severity',
bug_status => 'Status',
cc => 'CC',
classification => 'Classification',
cclist_accessible => 'CC list accessible',
commenter => 'Commenter',
component_id => 'Component ID',
component => 'Component',
content => 'Content',
'[Bug creation]' => 'Creation date',
opendate => 'Creation date',
creation_ts => 'Creation date',
deadline => 'Deadline',
changeddate => 'Changed',
delta_ts => 'Changed',
dependson => 'Depends on',
dup_id => 'Duplicate',
estimated_time => 'Orig. Est.',
everconfirmed => 'Ever confirmed',
keywords => 'Keywords',
interval_time => 'Period Worktime',
work_time => 'Hours Worked',
actual_time => 'Hours Worked',
longdesc => 'Comment',
newcc => 'CC',
op_sys => 'OS',
owner_idle_time => 'Time Since Assignee Touched',
percentage_complete => '%Complete',
priority => 'Priority',
product_id => 'Product ID',
product => 'Product',
qa_contact => 'QA Contact',
remaining_time => 'Hours Left',
rep_platform => 'Hardware',
reporter => 'Reporter',
reporter_accessible => 'Reporter accessible',
resolution => 'Resolution',
see_also => 'See Also',
setting => 'Setting',
settings => 'Settings',
short_desc => 'Summary',
status_whiteboard => 'Whiteboard',
target_milestone => 'Target Milestone',
version => 'Version',
votes => 'Votes',
work_time => 'Hours Worked',
interval_time => 'Period Worktime',
comment0 => 'First Comment',
'longdescs.isprivate' => 'Comment is private',
'attach_data.thedata' => 'Attachment data',
'attachments.description' => 'Attachment description',
'attachments.filename' => 'Attachment filename',
'attachments.mimetype' => 'Attachment mime type',
'attachments.ispatch' => 'Attachment is patch',
'attachments.isobsolete' => 'Attachment is obsolete',
'attachments.isprivate' => 'Attachment is private',
'attachments.isurl' => 'Attachment is a URL',
'attachments.submitter' => 'Attachment creator',
'flagtypes.name' => 'Flags',
'requestees.login_name' => 'Flag Requestee',
'setters.login_name' => 'Flag Setter',
},
};
__END__
#!/usr/bin/perl
# Internationalisation messages for English Bugzilla
package Bugzilla::Language::en;
use strict;
use Bugzilla::Constants;
my $terms = {
bug => 'bug',
Bug => 'Bug',
abug => 'a bug',
Abug => 'A bug',
aBug => 'a Bug',
ABug => 'A Bug',
bugs => 'bugs',
Bugs => 'Bugs',
zeroSearchResults => 'Zarro Boogs found',
Bugzilla => 'Bugzilla',
};
$Bugzilla::messages->{en} = {
terms => $terms,
operator_descs => {
not => 'NOT',
noop => '---',
equals => 'is equal to',
notequals => 'is not equal to',
anyexact => 'is equal to any of the strings',
substring => 'contains the string',
casesubstring => 'contains the string (exact case)',
notsubstring => 'does not contain the string',
anywordssubstr => 'contains any of the strings',
allwordssubstr => 'contains all of the strings',
nowordssubstr => 'contains none of the strings',
regexp => 'matches regular expression',
notregexp => 'does not match regular expression',
lessthan => 'is less than',
lessthaneq => 'is less than or equal to',
greaterthan => 'is greater than',
greaterthaneq => 'is greater than or equal to',
anywords => 'contains any of the words',
allwords => 'contains all of the words',
nowords => 'contains none of the words',
changedbefore => 'changed before',
changedafter => 'changed after',
changedfrom => 'changed from',
changedto => 'changed to',
changedby => 'changed by',
matches => 'matches',
notmatches => 'does not match',
insearch => 'matched by saved search',
notinsearch => 'not matched by saved search',
},
field_types => {
FIELD_TYPE_UNKNOWN() => 'Unknown Type',
FIELD_TYPE_FREETEXT() => 'Free Text',
FIELD_TYPE_SINGLE_SELECT() => 'Drop Down',
FIELD_TYPE_MULTI_SELECT() => 'Multiple-Selection Box',
FIELD_TYPE_TEXTAREA() => 'Large Text Box',
FIELD_TYPE_DATETIME() => 'Date/Time',
FIELD_TYPE_BUG_ID() => $terms->{Bug}.' ID',
FIELD_TYPE_NUMERIC() => 'Numeric',
},
field_descs => {
actual_time => 'Actual Hours',
alias => 'Alias',
assigned_to => 'Assignee',
blocked => 'Blocks',
bug_file_loc => 'URL',
bug_group => 'Group',
bug_id => $terms->{Bug}.' ID',
bug_severity => 'Severity',
bug_status => 'Status',
cc => 'CC',
classification => 'Classification',
cclist_accessible => 'CC list accessible',
commenter => 'Commenter',
component_id => 'Component ID',
component => 'Component',
content => 'Content',
'[Bug creation]' => 'Creation date',
opendate => 'Creation date',
creation_ts => 'Creation date',
deadline => 'Deadline',
changeddate => 'Changed',
delta_ts => 'Changed',
dependson => 'Depends on',
dup_id => 'Duplicate',
estimated_time => 'Orig. Est.',
everconfirmed => 'Ever confirmed',
keywords => 'Keywords',
longdesc => 'Comment',
newcc => 'CC',
op_sys => 'OS',
owner_idle_time => 'Time Since Assignee Touched',
percentage_complete => '%Complete',
priority => 'Priority',
product_id => 'Product ID',
product => 'Product',
qa_contact => 'QA Contact',
remaining_time => 'Hours Left',
rep_platform => 'Hardware',
reporter => 'Reporter',
reporter_accessible => 'Reporter accessible',
resolution => 'Resolution',
see_also => 'See Also',
setting => 'Setting',
settings => 'Settings',
short_desc => 'Summary',
status_whiteboard => 'Whiteboard',
target_milestone => 'Target Milestone',
version => 'Version',
votes => 'Votes',
work_time => 'Hours Worked',
interval_time => 'Period Worktime',
comment0 => 'First Comment',
'longdescs.isprivate' => 'Comment is private',
'attach_data.thedata' => 'Attachment data',
'attachments.description' => 'Attachment description',
@ -392,9 +131,26 @@ $Bugzilla::messages->{en} = {
'attachments.isprivate' => 'Attachment is private',
'attachments.isurl' => 'Attachment is a URL',
'attachments.submitter' => 'Attachment creator',
'flagtypes.name' => 'Flags',
'flagtypes.name' => 'Flag Types',
'requestees.login_name' => 'Flag Requestee',
'setters.login_name' => 'Flag Setter',
# Names with other_ prefix are used with correlated search terms
other_work_time => 'Hours Worked $1',
other_longdesc => 'Comment $1',
other_commenter => 'Comment $1 author',
'other_longdescs.isprivate' => 'Comment $1 is private',
'other_attach_data.thedata' => 'Attachment $1 data',
'other_attachments.description' => 'Attachment $1 description',
'other_attachments.filename' => 'Attachment $1 filename',
'other_attachments.mimetype' => 'Attachment $1 mime type',
'other_attachments.ispatch' => 'Attachment $1 is patch',
'other_attachments.isobsolete' => 'Attachment $1 is obsolete',
'other_attachments.isprivate' => 'Attachment $1 is private',
'other_attachments.isurl' => 'Attachment $1 is a URL',
'other_attachments.submitter' => 'Attachment $1 creator',
'other_flagtypes.name' => 'Flag $1 Type',
'other_requestees.login_name' => 'Flag $1 Requestee',
'other_setters.login_name' => 'Flag $1 Setter',
},
};

View File

@ -489,15 +489,22 @@ sub STATIC_COLUMNS
title => $field->description . ' ' . $subfield->description,
joins => $join,
subid => $subid,
sortkey => 1,
};
}
}
}
for (qw(longdesc commenter work_time), grep { /\./ } keys %$columns)
{
$columns->{$_}->{may_be_correlated} = $columns->{$_}->{sortkey} = 1;
}
# short_short_desc is short_desc truncated to 60 characters
# see template list/table.html.tmpl
# FIXME move truncation away from templates
$columns->{short_short_desc} = $columns->{short_desc};
$columns->{short_short_desc} = { %{ $columns->{short_desc} } };
$columns->{short_short_desc}->{nocharts} = 1;
Bugzilla::Hook::process('buglist_static_columns', { columns => $columns });

View File

@ -187,8 +187,8 @@ $vars->{text_types} = Bugzilla::Search->TEXT_OPERATORS_ORDER;
# Fields for boolean charts
$vars->{chart_fields} = [
map { { name => $_->{id}, title => $_->{title} } }
sort { $a->{title} cmp $b->{title} }
map { { id => $_->{id}, name => $_->{title} } }
sort { (($a->{sortkey}||0) <=> ($b->{sortkey}||0)) || ($a->{title} cmp $b->{title}) }
grep { !$_->{nocharts} }
values %{ Bugzilla::Search->COLUMNS }
];
@ -204,6 +204,8 @@ if (!Bugzilla->user->is_timetracker) {
}
# Parse boolean charts from the form hash
# FIXME add support for "Attachment 2 submitter", ..., i.e., selecting
# the target of a search term that could be correlated
my @charts;
for (keys %$params)
{

View File

@ -75,9 +75,7 @@ table#flags {
margin-top: 0;
}
#bz_enable_role_visibility_help {
margin-top: 1em;
}
#bz_enable_role_visibility_help { margin-bottom: 0.5em; }
.bz_time_tracking_table {
border-collapse: collapse;

View File

@ -604,16 +604,15 @@ document.changeform = document.[% cfname %];
[% END %]
[% IF group.ingroup %]
<input type="hidden" name="defined_bit-[% group.bit %]" value="1">
<input type="hidden" name="defined_bit-[% group.bit %]" value="1" />
[% END %]
<input type="checkbox" value="1" name="bit-[% group.bit %]"
id="bit-[% group.bit %]"
[% ' checked="checked"' IF group.ison %]
[% ' disabled="disabled"' IF NOT group.ingroup %]>
<label for="bit-[% group.bit %]">
[%- group.description FILTER html_light %]</label>
<br>
[% ' disabled="disabled"' IF NOT group.ingroup %] />
<label for="bit-[% group.bit %]">[%- group.description FILTER html_light %]</label>
<br />
[% END %]
[% IF emitted_description %]
@ -624,9 +623,8 @@ document.changeform = document.[% cfname %];
[% END %]
[% IF inagroup %]
<div id="bz_enable_role_visibility_help">
<b>Users in the roles selected below can always view
this [% terms.bug %]:</b>
<div id="bz_enable_role_visibility_help" [% ' style="margin-top: 0.5em"' IF emitted_description %]>
<b>A[% 'lso a' IF emitted_description %]llow to view this [% terms.bug %]:</b>
</div>
<div id="bz_enable_role_visibility">
<div>
@ -634,13 +632,13 @@ document.changeform = document.[% cfname %];
bug.check_can_change_field("reporter_accessible", 0, 1)
%]
[% IF user_can_edit_accessible %]
<input type="hidden" name="defined_reporter_accessible" value="1">
<input type="hidden" name="defined_reporter_accessible" value="1" />
[% END %]
<input type="checkbox" value="1"
name="reporter_accessible" id="reporter_accessible"
[% " checked" IF bug.reporter_accessible %]
[% " disabled=\"disabled\"" UNLESS user_can_edit_accessible %]>
<label for="reporter_accessible">Reporter</label>
[% " disabled=\"disabled\"" UNLESS user_can_edit_accessible %] />
<label for="reporter_accessible">Allow reporter to view this [% terms.bug %]</label>
</div>
<div>
[% user_can_edit_accessible =
@ -653,7 +651,7 @@ document.changeform = document.[% cfname %];
name="cclist_accessible" id="cclist_accessible"
[% " checked" IF bug.cclist_accessible %]
[% " disabled=\"disabled\"" UNLESS user_can_edit_accessible %]>
<label for="cclist_accessible">CC List</label>
<label for="cclist_accessible">Allow CC List users to view this [% terms.bug %]</label>
</div>
<p class="instructions">
The assignee