Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
e008fbf6
Commit
e008fbf6
authored
Dec 08, 2002
by
bbaetz%student.usyd.edu.au
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 176461 - Move descs strings from change-columns.html.tmpl to
field-descs.html.tmpl Patch by burnus@gmx.de (Tobias Burnus), r=gerv, bbaetz, a=justdave
parent
a34d8f57
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
78 additions
and
74 deletions
+78
-74
buglist.cgi
buglist.cgi
+36
-26
colchange.cgi
colchange.cgi
+6
-5
globals.pl
globals.pl
+3
-2
field-descs.html.tmpl
template/en/default/global/field-descs.html.tmpl
+2
-0
change-columns.html.tmpl
template/en/default/list/change-columns.html.tmpl
+7
-24
table.html.tmpl
template/en/default/list/table.html.tmpl
+24
-17
No files found.
buglist.cgi
View file @
e008fbf6
...
...
@@ -216,7 +216,7 @@ sub GetGroupsByUserId {
while
(
MoreSQLData
())
{
my
$group
=
{};
(
$group
->
{
'id'
},
$group
->
{
'name'
},
(
$group
->
{
'
bug_
id'
},
$group
->
{
'name'
},
$group
->
{
'description'
},
$group
->
{
'isactive'
})
=
FetchSQLData
();
push
(
@groups
,
$group
);
}
...
...
@@ -363,7 +363,7 @@ elsif ($::FORM{'cmdtype'} eq "doit" && $::FORM{'remember'}) {
# Note: There are a few hacks in the code that deviate from these definitions.
# In particular, when the list is sorted by the "votes" field the word
# "DESC" is added to the end of the field to sort in descending order,
# and the redundant s
ummaryfull
column is removed when the client
# and the redundant s
hort_desc
column is removed when the client
# requests "all" columns.
my
$columns
=
{};
...
...
@@ -373,33 +373,33 @@ sub DefineColumn {
}
# Column: ID Name Title
DefineColumn
(
"
id"
,
"bugs.bug_id"
,
"ID"
);
DefineColumn
(
"
bug_id"
,
"bugs.bug_id"
,
"ID"
);
DefineColumn
(
"opendate"
,
"bugs.creation_ts"
,
"Opened"
);
DefineColumn
(
"changeddate"
,
"bugs.delta_ts"
,
"Changed"
);
DefineColumn
(
"
severity"
,
"bugs.bug_severity"
,
"Severity"
);
DefineColumn
(
"
bug_severity"
,
"bugs.bug_severity"
,
"Severity"
);
DefineColumn
(
"priority"
,
"bugs.priority"
,
"Priority"
);
DefineColumn
(
"
platform"
,
"bugs.rep_platform"
,
"Platform
"
);
DefineColumn
(
"
owner"
,
"map_assigned_to.login_name"
,
"Owner"
);
DefineColumn
(
"
owner_realname"
,
"map_assigned_to.realname"
,
"Owner"
);
DefineColumn
(
"
rep_platform"
,
"bugs.rep_platform"
,
"Hardware
"
);
DefineColumn
(
"
assigned_to"
,
"map_assigned_to.login_name"
,
"Assignee"
);
DefineColumn
(
"
assigned_to_realname"
,
"map_assigned_to.realname"
,
"Assignee"
);
DefineColumn
(
"reporter"
,
"map_reporter.login_name"
,
"Reporter"
);
DefineColumn
(
"reporter_realname"
,
"map_reporter.realname"
,
"Reporter"
);
DefineColumn
(
"qa_contact"
,
"map_qa_contact.login_name"
,
"QA Contact"
);
DefineColumn
(
"qa_contact_realname"
,
"map_qa_contact.realname"
,
"QA Contact"
);
DefineColumn
(
"
status"
,
"bugs.bug_status"
,
"State"
);
DefineColumn
(
"
bug_status"
,
"bugs.bug_status"
,
"Status"
);
DefineColumn
(
"resolution"
,
"bugs.resolution"
,
"Result"
);
DefineColumn
(
"s
ummary"
,
"bugs.short_desc"
,
"Summary"
);
DefineColumn
(
"s
ummaryfull"
,
"bugs.short_desc"
,
"Summary"
);
DefineColumn
(
"s
hort_short_desc"
,
"bugs.short_desc"
,
"Summary"
);
DefineColumn
(
"s
hort_desc"
,
"bugs.short_desc"
,
"Summary"
);
DefineColumn
(
"status_whiteboard"
,
"bugs.status_whiteboard"
,
"Status Summary"
);
DefineColumn
(
"component"
,
"map_components.name"
,
"Component"
);
DefineColumn
(
"product"
,
"map_products.name"
,
"Product"
);
DefineColumn
(
"version"
,
"bugs.version"
,
"Version"
);
DefineColumn
(
"o
s"
,
"bugs.op_sys"
,
"OS"
);
DefineColumn
(
"o
p_sys"
,
"bugs.op_sys"
,
"OS"
);
DefineColumn
(
"target_milestone"
,
"bugs.target_milestone"
,
"Target Milestone"
);
DefineColumn
(
"votes"
,
"bugs.votes"
,
"Votes"
);
DefineColumn
(
"keywords"
,
"bugs.keywords"
,
"Keywords"
);
DefineColumn
(
"estimated_time"
,
"bugs.estimated_time"
,
"Estimated Hours"
);
DefineColumn
(
"remaining_time"
,
"bugs.remaining_time"
,
"Remaining Hours"
);
DefineColumn
(
"actual_time"
,
"(SUM(ldtime.work_time)*COUNT(DISTINCT ldtime.bug_when)/COUNT(bugs.bug_id)) AS actual_time"
,
"Actual Hours"
);
DefineColumn
(
"estimated_time"
,
"bugs.estimated_time"
,
"Estimated Hours"
);
DefineColumn
(
"remaining_time"
,
"bugs.remaining_time"
,
"Remaining Hours"
);
DefineColumn
(
"actual_time"
,
"(SUM(ldtime.work_time)*COUNT(DISTINCT ldtime.bug_when)/COUNT(bugs.bug_id)) AS actual_time"
,
"Actual Hours"
);
DefineColumn
(
"percentage_complete"
,
"(100*((SUM(ldtime.work_time)*COUNT(DISTINCT ldtime.bug_when)/COUNT(bugs.bug_id))/((SUM(ldtime.work_time)*COUNT(DISTINCT ldtime.bug_when)/COUNT(bugs.bug_id))+bugs.remaining_time))) AS percentage_complete"
,
"% Complete"
);
################################################################################
# Display Column Determination
...
...
@@ -411,16 +411,26 @@ my @displaycolumns = ();
if
(
defined
$params
->
param
(
'columnlist'
))
{
if
(
$params
->
param
(
'columnlist'
)
eq
"all"
)
{
# If the value of the CGI parameter is "all", display all columns,
# but remove the redundant "s
ummaryfull
" column.
@displaycolumns
=
grep
(
$_
ne
's
ummaryfull
'
,
keys
(
%
$columns
));
# but remove the redundant "s
hort_desc
" column.
@displaycolumns
=
grep
(
$_
ne
's
hort_desc
'
,
keys
(
%
$columns
));
}
else
{
@displaycolumns
=
split
(
/[ ,]+/
,
$params
->
param
(
'columnlist'
));
}
}
elsif
(
defined
$::COOKIE
{
'COLUMNLIST'
})
{
# 2002-10-31 Rename column names (see bug 176461)
my
$columnlist
=
$::COOKIE
{
'COLUMNLIST'
};
$columnlist
=~
s/owner/assigned_to/
;
$columnlist
=~
s/owner_realname/assigned_to_realname/
;
$columnlist
=~
s/[^_]platform/rep_platform/
;
$columnlist
=~
s/[^_]severity/bug_severity/
;
$columnlist
=~
s/[^_]status/bug_status/
;
$columnlist
=~
s/summaryfull/short_desc/
;
$columnlist
=~
s/summary/short_short_desc/
;
# Use the columns listed in the user's preferences.
@displaycolumns
=
split
(
/ /
,
$
::COOKIE
{
'COLUMNLIST'
}
);
@displaycolumns
=
split
(
/ /
,
$
columnlist
);
}
else
{
# Use the default list of columns.
...
...
@@ -434,7 +444,7 @@ else {
# Remove the "ID" column from the list because bug IDs are always displayed
# and are hard-coded into the display templates.
@displaycolumns
=
grep
(
$_
ne
'id'
,
@displaycolumns
);
@displaycolumns
=
grep
(
$_
ne
'
bug_
id'
,
@displaycolumns
);
# Add the votes column to the list of columns to be displayed
# in the bug list if the user is searching for bugs with a certain
...
...
@@ -464,7 +474,7 @@ if (!UserInGroup(Param("timetrackinggroup"))) {
# Generate the list of columns that will be selected in the SQL query.
# The bug ID is always selected because bug IDs are always displayed
my
@selectcolumns
=
(
"id"
);
my
@selectcolumns
=
(
"
bug_
id"
);
# remaining and actual_time are required for precentage_complete calculation:
if
(
lsearch
(
\
@displaycolumns
,
"percentage_complete"
)
>=
0
)
{
...
...
@@ -480,7 +490,7 @@ push (@selectcolumns, @displaycolumns);
# has for modifying the bugs.
if
(
$dotweak
)
{
push
(
@selectcolumns
,
"product"
)
if
!
grep
(
$_
eq
'product'
,
@selectcolumns
);
push
(
@selectcolumns
,
"
status"
)
if
!
grep
(
$_
eq
'
status'
,
@selectcolumns
);
push
(
@selectcolumns
,
"
bug_status"
)
if
!
grep
(
$_
eq
'bug_
status'
,
@selectcolumns
);
}
...
...
@@ -662,9 +672,9 @@ while (my @row = FetchSQLData()) {
(
$bug
->
{
'opendate'
}
=
DiffDate
(
$bug
->
{
'opendate'
}))
if
$bug
->
{
'opendate'
};
# Record the owner, product, and status in the big hashes of those things.
$bugowners
->
{
$bug
->
{
'
owner'
}}
=
1
if
$bug
->
{
'owner
'
};
$bugowners
->
{
$bug
->
{
'
assigned_to'
}}
=
1
if
$bug
->
{
'assigned_to
'
};
$bugproducts
->
{
$bug
->
{
'product'
}}
=
1
if
$bug
->
{
'product'
};
$bugstatuses
->
{
$bug
->
{
'
status'
}}
=
1
if
$bug
->
{
'
status'
};
$bugstatuses
->
{
$bug
->
{
'
bug_status'
}}
=
1
if
$bug
->
{
'bug_
status'
};
$bug
->
{
isingroups
}
=
0
;
...
...
@@ -672,7 +682,7 @@ while (my @row = FetchSQLData()) {
push
(
@bugs
,
$bug
);
# Add id to list for checking for bug privacy later
push
(
@bugidlist
,
$bug
->
{
id
});
push
(
@bugidlist
,
$bug
->
{
'bug_id'
});
}
# Switch back from the shadow database to the regular database so PutFooter()
...
...
@@ -688,11 +698,11 @@ if (@bugidlist) {
"WHERE bugs.bug_id = bug_group_map.bug_id "
.
"AND bugs.bug_id IN ("
.
join
(
','
,
@bugidlist
)
.
")"
);
while
(
MoreSQLData
())
{
my
(
$id
)
=
FetchSQLData
();
$privatebugs
{
$id
}
=
1
;
my
(
$
bug_
id
)
=
FetchSQLData
();
$privatebugs
{
$
bug_
id
}
=
1
;
}
foreach
my
$bug
(
@bugs
)
{
if
(
$privatebugs
{
$bug
->
{
id
}})
{
if
(
$privatebugs
{
$bug
->
{
'bug_id'
}})
{
$bug
->
{
isingroups
}
=
1
;
}
}
...
...
colchange.cgi
View file @
e008fbf6
...
...
@@ -41,10 +41,11 @@ GetVersionTable();
# The master list not only says what fields are possible, but what order
# they get displayed in.
my
@masterlist
=
(
"opendate"
,
"changeddate"
,
"severity"
,
"priority"
,
"platform"
,
"owner"
,
"owner_realname"
,
"reporter"
,
"reporter_realname"
,
"status"
,
"resolution"
,
"product"
,
"component"
,
"version"
,
"os"
,
"votes"
);
my
@masterlist
=
(
"opendate"
,
"changeddate"
,
"bug_severity"
,
"priority"
,
"rep_platform"
,
"assigned_to"
,
"assigned_to_realname"
,
"reporter"
,
"reporter_realname"
,
"bug_status"
,
"resolution"
,
"product"
,
"component"
,
"version"
,
"op_sys"
,
"votes"
);
if
(
Param
(
"usetargetmilestone"
))
{
push
(
@masterlist
,
"target_milestone"
);
...
...
@@ -65,7 +66,7 @@ if (UserInGroup(Param("timetrackinggroup"))) {
"percentage_complete"
));
}
push
(
@masterlist
,
(
"s
ummary"
,
"summaryfull
"
));
push
(
@masterlist
,
(
"s
hort_desc"
,
"short_short_desc
"
));
$vars
->
{
'masterlist'
}
=
\
@masterlist
;
...
...
globals.pl
View file @
e008fbf6
...
...
@@ -334,8 +334,9 @@ sub FetchOneColumn {
@::default_column_list
=
(
"severity"
,
"priority"
,
"platform"
,
"owner"
,
"status"
,
"resolution"
,
"summary"
);
@::default_column_list
=
(
"bug_severity"
,
"priority"
,
"rep_platform"
,
"assigned_to"
,
"bug_status"
,
"resolution"
,
"short_short_desc"
);
sub
AppendComment
{
my
(
$bugid
,
$who
,
$comment
,
$isprivate
,
$timestamp
,
$work_time
)
=
@_
;
...
...
template/en/default/global/field-descs.html.tmpl
View file @
e008fbf6
...
...
@@ -28,6 +28,7 @@
"bug_id" => "Bug ID",
"bug_severity" => "Severity",
"bug_status" => "Status",
"changeddate" => "Last Changed Date",
"cc" => "CC",
"cclist_accessible" => "CC list accessible?",
"component_id" => "Component ID",
...
...
@@ -40,6 +41,7 @@
"keywords" => "Keywords",
"newcc" => "CC",
"op_sys" => "OS",
"opendate" => "Open Date",
"percentage_complete" => "%Complete",
"priority" => "Priority",
"product_id" => "Product ID",
...
...
template/en/default/list/change-columns.html.tmpl
View file @
e008fbf6
...
...
@@ -28,36 +28,19 @@
this feature requires cookies to work.
</p>
[% desc = { "opendate" => "Open Date",
"changeddate" => "Last Changed Date",
"severity" => "Severity",
"priority" => "Priority",
"platform" => "Hardware",
"owner" => "Owner",
"owner_realname" => "Owner Realname",
"reporter" => "Reporter",
"reporter_realname" => "Reporter Realname",
"status" => "Status",
"resolution" => "Resolution",
"product" => "Product",
"component" => "Component",
"version" => "Version",
"os" => "OS",
"votes" => "Votes",
"keywords" => "Keywords",
"target_milestone" => "Target",
"qa_contact" => "QA Contact",
"qa_contact_realname" => "QA Contact Realname",
"status_whiteboard" => "Whiteboard",
"summary" => "Summary (first 60 characters)",
"summaryfull" => "Full Summary" } %]
[% PROCESS "global/field-descs.html.tmpl" %]
[% field_descs.short_short_desc = "Summary (first 60 characters)" %]
[% field_descs.short_desc = "Full Summary" %]
[% field_descs.assigned_to_realname = "Assignee Realname" %]
[% field_descs.reporter_realname = "Reporter Realname" %]
[% field_descs.qa_contact_realname = "QA Contact Realname" %]
<form action="colchange.cgi">
<input type="hidden" name="rememberedquery" value="[% buffer %]">
[% FOREACH column = masterlist %]
<input type="checkbox" id="[% column %]" name="column_[% column %]"
[% "checked='checked'" IF lsearch(collist, column) != -1 %]>
<label for="[% column %]">[%
desc
.${column} || column %]</label>
<label for="[% column %]">[%
field_descs
.${column} || column %]</label>
<br>
[% END %]
...
...
template/en/default/list/table.html.tmpl
View file @
e008fbf6
...
...
@@ -31,26 +31,33 @@
# wrap is set if a column's contents should be allowed to be word-wrapped
# by the browser.
#%]
[% PROCESS "global/field-descs.html.tmpl" %]
[% field_descs.short_short_desc = field_descs.short_desc %]
[% field_descs.assigned_to_realname = field_descs.assigned_to %]
[% field_descs.reporter_realname = field_descs.reporter %]
[% field_descs.qa_contact_realname = field_descs.qa_contact %]
[% abbrev =
{
"
severity"
=> { maxlength => 3 , title => "Sev" } ,
"priority" => { maxlength => 3 , title => "Pri" } ,
"
platform"
=> { maxlength => 3 , title => "Plt" } ,
"
status"
=> { maxlength => 4 } ,
"
reporter
" => { maxlength => 30 , ellipsis => "..." } ,
"
reporter
_realname" => { maxlength => 20 , ellipsis => "..." } ,
"
own
er" => { maxlength => 30 , ellipsis => "..." } ,
"
own
er_realname" => { maxlength => 20 , ellipsis => "..." } ,
"qa_contact" => { maxlength => 30 , ellipsis => "..." , title => "QAContact" } ,
"qa_contact_realname" => { maxlength => 20 , ellipsis => "..." , title => "QAContact" } ,
"
bug_severity"
=> { maxlength => 3 , title => "Sev" } ,
"priority"
=> { maxlength => 3 , title => "Pri" } ,
"
rep_platform"
=> { maxlength => 3 , title => "Plt" } ,
"
bug_status"
=> { maxlength => 4 } ,
"
assigned_to
" => { maxlength => 30 , ellipsis => "..." } ,
"
assigned_to
_realname" => { maxlength => 20 , ellipsis => "..." } ,
"
report
er" => { maxlength => 30 , ellipsis => "..." } ,
"
report
er_realname" => { maxlength => 20 , ellipsis => "..." } ,
"qa_contact"
=> { maxlength => 30 , ellipsis => "..." , title => "QAContact" } ,
"qa_contact_realname"
=> { maxlength => 20 , ellipsis => "..." , title => "QAContact" } ,
"resolution" => { maxlength => 4 } ,
"s
ummary" => { maxlength => 60 , ellipsis => "..." ,
wrap => 1 } ,
"s
ummaryfull" => {
wrap => 1 } ,
"s
hort_desc" => {
wrap => 1 } ,
"s
hort_short_desc" => { maxlength => 60 , ellipsis => "..." ,
wrap => 1 } ,
"status_whiteboard" => { title => "StatusSummary" , wrap => 1 } ,
"component" => { maxlength => 8 , title => "Comp" } ,
"product" => { maxlength => 8 } ,
"version" => { maxlength => 5 , title => "Vers" } ,
"o
s"
=> { maxlength => 4 } ,
"o
p_sys"
=> { maxlength => 4 } ,
"target_milestone" => { title => "TargetM" } ,
"percentage_complete" => { format_value => "%d %%" } ,
}
...
...
@@ -111,7 +118,7 @@
<a href="buglist.cgi?[% urlquerypart %]&order=
[% column.name FILTER url_quote FILTER html %]
[% ",$qorder" FILTER html IF order %]">
[%- abbrev.$id.title || column.title -%]</a>
[%- abbrev.$id.title ||
field_descs.$id ||
column.title -%]</a>
</th>
[% END %]
...
...
@@ -128,11 +135,11 @@
[% tableheader %]
[% END %]
<tr class="bz_[% bug.severity %] bz_[% bug.priority %] [%+ "bz_secure" IF bug.isingroups %]">
<tr class="bz_[% bug.
bug_
severity %] bz_[% bug.priority %] [%+ "bz_secure" IF bug.isingroups %]">
<td>
[% IF dotweak %]<input type="checkbox" name="id_[% bug.id %]">[% END %]
<a href="show_bug.cgi?id=[% bug.
id %]">[% bug.
id %]</a>
[% IF dotweak %]<input type="checkbox" name="id_[% bug.
bug_
id %]">[% END %]
<a href="show_bug.cgi?id=[% bug.
bug_id %]">[% bug.bug_
id %]</a>
</td>
[% FOREACH column = displaycolumns %]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment