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
27e28372
Commit
27e28372
authored
Jan 25, 2005
by
travis%sedsystems.ca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 201818 : Convert long_list.cgi to a format
Patch by Rob Siklos <robzilla@siklos.ca> r=wurblzap, glob a=myk
parent
fb8af703
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
114 deletions
+28
-114
buglist.cgi
buglist.cgi
+1
-1
long_list.cgi
long_list.cgi
+7
-98
knob.html.tmpl
template/en/default/bug/knob.html.tmpl
+1
-1
show-multiple.html.tmpl
template/en/default/bug/show-multiple.html.tmpl
+13
-7
filterexceptions.pl
template/en/default/filterexceptions.pl
+0
-4
site-navigation.html.tmpl
template/en/default/global/site-navigation.html.tmpl
+1
-1
list.html.tmpl
template/en/default/list/list.html.tmpl
+5
-2
No files found.
buglist.cgi
View file @
27e28372
...
@@ -863,7 +863,7 @@ if (@bugidlist) {
...
@@ -863,7 +863,7 @@ if (@bugidlist) {
# Define the variables and functions that will be passed to the UI template.
# Define the variables and functions that will be passed to the UI template.
$vars
->
{
'bugs'
}
=
\
@bugs
;
$vars
->
{
'bugs'
}
=
\
@bugs
;
$vars
->
{
'buglist'
}
=
join
(
','
,
@bugidlist
)
;
$vars
->
{
'buglist'
}
=
\
@bugidlist
;
$vars
->
{
'columns'
}
=
$columns
;
$vars
->
{
'columns'
}
=
$columns
;
$vars
->
{
'displaycolumns'
}
=
\
@displaycolumns
;
$vars
->
{
'displaycolumns'
}
=
\
@displaycolumns
;
...
...
long_list.cgi
View file @
27e28372
...
@@ -24,108 +24,17 @@
...
@@ -24,108 +24,17 @@
use
strict
;
use
strict
;
use
lib
qw(.)
;
use
lib
qw(.)
;
use
Bugzilla
;
require
"CGI.pl"
;
require
"CGI.pl"
;
use
vars
qw($userid @legal_keywords)
;
our
$cgi
;
# Use global template variables.
use
vars
qw($template $vars)
;
Bugzilla
->
login
();
GetVersionTable
();
my
$cgi
=
Bugzilla
->
cgi
;
my
$generic_query
=
"
SELECT
bugs.bug_id,
COALESCE(bugs.alias, ''),
classifications.name,
products.name,
bugs.version,
bugs.rep_platform,
bugs.op_sys,
bugs.bug_status,
bugs.resolution,
bugs.priority,
bugs.bug_severity,
components.name,
assign.login_name,
report.login_name,
bugs.bug_file_loc,
bugs.short_desc,
bugs.target_milestone,
bugs.qa_contact,
bugs.status_whiteboard,
bugs.keywords,
bugs.estimated_time,
bugs.remaining_time,
date_format(creation_ts,'%Y.%m.%d %H:%i'),
date_format(bugs.deadline, '%Y-%m-%d')
FROM bugs,profiles assign,profiles report, classifications, products, components
WHERE assign.userid = bugs.assigned_to AND report.userid = bugs.reporter
AND bugs.product_id=products.id AND bugs.component_id=components.id
AND products.classification_id = classifications.id"
;
my
$buglist
=
$cgi
->
param
(
'buglist'
)
||
$cgi
->
param
(
'bug_id'
)
||
$cgi
->
param
(
'id'
)
||
""
;
my
@bugs
;
foreach
my
$bug_id
(
split
(
/[:,]/
,
$buglist
))
{
# Convert comma/space separated elements into separate params
detaint_natural
(
$bug_id
)
||
next
;
my
@ids
=
();
Bugzilla
->
user
->
can_see_bug
(
$bug_id
)
||
next
;
SendSQL
(
"$generic_query AND bugs.bug_id = $bug_id"
);
my
%
bug
;
if
(
defined
$cgi
->
param
(
'buglist'
))
{
my
@row
=
FetchSQLData
();
@ids
=
split
(
/[, ]+/
,
$cgi
->
param
(
'buglist'
));
foreach
my
$field
(
"bug_id"
,
"alias"
,
"classification"
,
"product"
,
"version"
,
"rep_platform"
,
"op_sys"
,
"bug_status"
,
"resolution"
,
"priority"
,
"bug_severity"
,
"component"
,
"assigned_to"
,
"reporter"
,
"bug_file_loc"
,
"short_desc"
,
"target_milestone"
,
"qa_contact"
,
"status_whiteboard"
,
"keywords"
,
"estimated_time"
,
"remaining_time"
,
"creation_ts"
,
"deadline"
)
{
$bug
{
$field
}
=
shift
@row
;
}
if
(
$bug
{
'bug_id'
})
{
$bug
{
'comments'
}
=
GetComments
(
$bug
{
'bug_id'
});
$bug
{
'qa_contact'
}
=
$bug
{
'qa_contact'
}
>
0
?
DBID_to_name
(
$bug
{
'qa_contact'
})
:
""
;
push
(
@bugs
,
\%
bug
);
}
if
(
UserInGroup
(
Param
(
"timetrackinggroup"
)))
{
SendSQL
(
"SELECT SUM(work_time) FROM longdescs WHERE bug_id=$bug_id"
);
$bug
{
'actual_time'
}
=
FetchSQLData
();
}
}
}
# Add the list of bug hashes to the variables
my
$ids
=
join
(
''
,
map
{
$_
=
"&id="
.
$_
}
@ids
);
$vars
->
{
'bugs'
}
=
\
@bugs
;
$vars
->
{
'use_keywords'
}
=
1
if
(
@::legal_keywords
);
$vars
->
{
'str2time'
}
=
\&
str2time
;
# Work out a sensible filename for Content-Disposition.
# Sadly, I don't think we can tell if this was a named query.
my
@time
=
localtime
(
time
());
my
$date
=
sprintf
"%04d-%02d-%02d"
,
1900
+
$time
[
5
],
$time
[
4
]
+
1
,
$time
[
3
];
my
$filename
=
"bugs-$date.html"
;
print
$cgi
->
header
(
-
content_disposition
=>
"inline; filename=$filename"
);
# Generate and return the UI (HTML page) from the appropriate template.
print
$cgi
->
redirect
(
"show_bug.cgi?format=multiple$ids"
);
$template
->
process
(
"bug/show-multiple.html.tmpl"
,
$vars
)
||
ThrowTemplateError
(
$template
->
error
());
template/en/default/bug/knob.html.tmpl
View file @
27e28372
...
@@ -168,7 +168,7 @@
...
@@ -168,7 +168,7 @@
<b>
<b>
<a href="show_activity.cgi?id=[% bug.bug_id %]">View [% terms.Bug %] Activity</a>
<a href="show_activity.cgi?id=[% bug.bug_id %]">View [% terms.Bug %] Activity</a>
|
|
<a href="
long_list.cgi?buglist
=[% bug.bug_id %]">Format For Printing</a>
<a href="
show_bug.cgi?format=multiple&id
=[% bug.bug_id %]">Format For Printing</a>
</b>
</b>
</font>
</font>
...
...
template/en/default/bug/show-multiple.html.tmpl
View file @
27e28372
...
@@ -89,13 +89,19 @@
...
@@ -89,13 +89,19 @@
<tr>
<tr>
[% PROCESS cell attr = { description => "Resolution",
[% PROCESS cell attr = { description => "Resolution",
name => "resolution" } %]
name => "resolution" } %]
[% PROCESS cell attr = { description => "Assigned To",
<td>
name => "assigned_to" } %]
<b>Assigned To:</b>
[% PROCESS cell attr = { description => "Reported By",
[% bug.assigned_to.login FILTER html %]
name => "reporter" } %]
</td>
<td>
<b>Reported By:</b>
[% bug.reporter.login FILTER html %]
</td>
[% IF Param('useqacontact') %]
[% IF Param('useqacontact') %]
[% PROCESS cell attr = { description => "QA Contact",
<td>
name => "qa_contact" } %]
<b>QA Contact:</b>
[% bug.qa_contact.login FILTER html %]
</td>
[% END %]
[% END %]
</tr>
</tr>
...
@@ -190,7 +196,7 @@
...
@@ -190,7 +196,7 @@
</table>
</table>
[% PROCESS bug/comments.html.tmpl
[% PROCESS bug/comments.html.tmpl
comments = bug.
comment
s %]
comments = bug.
longdesc
s %]
<hr>
<hr>
[% END %]
[% END %]
...
...
template/en/default/filterexceptions.pl
View file @
27e28372
...
@@ -217,10 +217,6 @@
...
@@ -217,10 +217,6 @@
'title'
,
'title'
,
],
],
'list/list.html.tmpl'
=>
[
'buglist'
,
],
'list/list.rdf.tmpl'
=>
[
'list/list.rdf.tmpl'
=>
[
'template_version'
,
'template_version'
,
'bug.bug_id'
,
'bug.bug_id'
,
...
...
template/en/default/global/site-navigation.html.tmpl
View file @
27e28372
...
@@ -73,7 +73,7 @@
...
@@ -73,7 +73,7 @@
<link rel="Show" title="[% terms.Bug %] Activity"
<link rel="Show" title="[% terms.Bug %] Activity"
href="show_activity.cgi?id=[% bug.bug_id %]">
href="show_activity.cgi?id=[% bug.bug_id %]">
<link rel="Show" title="Printer-Friendly Version"
<link rel="Show" title="Printer-Friendly Version"
href="
long_list.cgi?buglist
=[% bug.bug_id %]">
href="
show_bug.cgi?format=multiple&id
=[% bug.bug_id %]">
[% END %]
[% END %]
...
...
template/en/default/list/list.html.tmpl
View file @
27e28372
...
@@ -129,8 +129,11 @@
...
@@ -129,8 +129,11 @@
<tr>
<tr>
[% IF bugs.size > 0 %]
[% IF bugs.size > 0 %]
<td valign="middle">
<td valign="middle">
<form method="post" action="long_list.cgi">
<form method="post" action="show_bug.cgi">
<input type="hidden" name="buglist" value="[% buglist %]">
[% FOREACH id = buglist %]
<input type="hidden" name="id" value="[% id FILTER html %]">
[% END %]
<input type="hidden" name="format" value="multiple">
<input type="submit" value="Long Format">
<input type="submit" value="Long Format">
</form>
</form>
</td>
</td>
...
...
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