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
1e8a10cf
Commit
1e8a10cf
authored
Jan 19, 2001
by
gerv%gerv.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More bug 6682. Perhaps this could be it.
parent
15775781
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
15 deletions
+29
-15
checksetup.pl
checksetup.pl
+27
-13
collectstats.pl
collectstats.pl
+1
-1
reports.cgi
reports.cgi
+1
-1
No files found.
checksetup.pl
View file @
1e8a10cf
...
@@ -1788,7 +1788,7 @@ if (!($sth->fetchrow_arrayref()->[0])) {
...
@@ -1788,7 +1788,7 @@ if (!($sth->fetchrow_arrayref()->[0])) {
# If the graphs dir is not present, we assume that they have been using
# If the graphs dir is not present, we assume that they have been using
# a Bugzilla with the old data format, and so upgrade their data files.
# a Bugzilla with the old data format, and so upgrade their data files.
unless
(
-
d
'graphs'
)
{
unless
(
-
d
'graphs'
)
{
print
"Creating graphs directory
...\n"
;
print
"Creating graphs directory...\n"
;
mkdir
'graphs'
,
0770
;
mkdir
'graphs'
,
0770
;
if
(
$::webservergroup
eq
""
)
{
if
(
$::webservergroup
eq
""
)
{
chmod
0777
,
'graphs'
;
chmod
0777
,
'graphs'
;
...
@@ -1797,13 +1797,18 @@ unless (-d 'graphs') {
...
@@ -1797,13 +1797,18 @@ unless (-d 'graphs') {
# Upgrade data format
# Upgrade data format
foreach
my
$in_file
(
glob
(
"data/mining/*"
))
foreach
my
$in_file
(
glob
(
"data/mining/*"
))
{
{
# Don't try and upgrade image files!
# Don't try and upgrade image or db files!
if
((
$in_file
=~
/\.gif$/i
)
||
(
$in_file
=~
/\.png$/i
))
{
if
((
$in_file
=~
/\.gif$/i
)
||
(
$in_file
=~
/\.png$/i
)
||
(
$in_file
=~
/\.db$/i
)
||
(
$in_file
=~
/\.orig$/i
))
{
next
;
next
;
}
}
open
(
IN
,
$in_file
)
or
next
;
rename
(
"$in_file"
,
"$in_file.orig"
)
or
next
;
open
(
IN
,
"$in_file.orig"
)
or
next
;
open
(
OUT
,
">$in_file"
)
or
next
;
# Fields in the header
# Fields in the header
my
@declared_fields
=
();
my
@declared_fields
=
();
...
@@ -1814,17 +1819,17 @@ unless (-d 'graphs') {
...
@@ -1814,17 +1819,17 @@ unless (-d 'graphs') {
RESOLVED VERIFIED CLOSED)
;
RESOLVED VERIFIED CLOSED)
;
# Fields we actually want (matches the current collectstats.pl)
# Fields we actually want (matches the current collectstats.pl)
my
@out_fields
=
qw(DATE NEW ASSIGNED REOPENED UNCONFIRMED
my
@out_fields
=
qw(DATE NEW ASSIGNED REOPENED UNCONFIRMED
RESOLVED
VERIFIED CLOSED FIXED INVALID WONTFIX LATER REMIND
VERIFIED CLOSED FIXED INVALID WONTFIX LATER REMIND
DUPLICATE WORKSFORME MOVED)
;
DUPLICATE WORKSFORME MOVED)
;
while
(
<
IN
>
)
{
while
(
<
IN
>
)
{
if
(
/^# fields: (.*)\s$/
)
{
if
(
/^# fields
?
: (.*)\s$/
)
{
@declared_fields
=
map
uc
,
(
split
/\|/
,
$1
);
@declared_fields
=
map
uc
,
(
split
/\|
|\r
/
,
$1
);
print
"# fields: "
,
join
(
'|'
,
@out_fields
),
"\n"
;
print
OUT
"# fields: "
,
join
(
'|'
,
@out_fields
),
"\n"
;
}
}
elsif
(
/^(\d+\|.*)/
)
{
elsif
(
/^(\d+\|.*)/
)
{
my
@data
=
split
/\|/
,
$1
;
my
@data
=
split
/\|
|\r
/
,
$1
;
my
%
data
=
();
my
%
data
=
();
if
(
@data
==
@declared_fields
)
{
if
(
@data
==
@declared_fields
)
{
# old format
# old format
...
@@ -1838,19 +1843,28 @@ unless (-d 'graphs') {
...
@@ -1838,19 +1843,28 @@ unless (-d 'graphs') {
$data
{
$intermediate_fields
[
$i
]}
=
$data
[
$i
];
$data
{
$intermediate_fields
[
$i
]}
=
$data
[
$i
];
}
}
}
}
elsif
(
@data
==
@out_fields
)
{
# This line's fine - it has the right number of entries
for
my
$i
(
0
..
$#out_fields
)
{
$data
{
$out_fields
[
$i
]}
=
$data
[
$i
];
}
}
else
{
else
{
print
"Oh dear, input line $. of $in_file had "
.
scalar
(
@data
)
.
" fields\n"
;
print
"Oh dear, input line $. of $in_file had "
.
scalar
(
@data
)
.
" fields\n"
;
print
"This was unexpected. You may want to check your data files.\n"
;
print
"This was unexpected. You may want to check your data files.\n"
;
}
}
print
join
(
'|'
,
map
{
$data
{
$_
}
||
""
}
@out_fields
),
"\n"
;
print
OUT
join
(
'|'
,
map
{
defined
(
$data
{
$_
})
?
(
$data
{
$_
})
:
""
}
@out_fields
),
"\n"
;
}
}
else
{
else
{
print
;
print
OUT
;
}
}
}
}
close
(
IN
);
close
(
IN
);
close
(
OUT
);
}
}
}
}
...
...
collectstats.pl
View file @
1e8a10cf
...
@@ -102,7 +102,7 @@ sub collect_stats {
...
@@ -102,7 +102,7 @@ sub collect_stats {
#
#
# Do not edit me! This file is generated.
# Do not edit me! This file is generated.
#
#
# fields: DATE|NEW|ASSIGNED|REOPENED|UNCONFIRMED|FIXED|INVALID|WONTFIX|LATER|REMIND|DUPLICATE|WORKSFORME|MOVED
# fields: DATE|NEW|ASSIGNED|REOPENED|UNCONFIRMED|
RESOLVED|VERIFIED|CLOSED|
FIXED|INVALID|WONTFIX|LATER|REMIND|DUPLICATE|WORKSFORME|MOVED
# Product: $product
# Product: $product
# Created: $when
# Created: $when
FIN
FIN
...
...
reports.cgi
View file @
1e8a10cf
...
@@ -566,7 +566,7 @@ sub generate_chart {
...
@@ -566,7 +566,7 @@ sub generate_chart {
next
unless
$_
;
next
unless
$_
;
if
(
/^#/
)
{
if
(
/^#/
)
{
if
(
/^# fields?: (.*)\s*$/
)
{
if
(
/^# fields?: (.*)\s*$/
)
{
@fields
=
split
/\|/
,
$1
;
@fields
=
split
/\|
|\r
/
,
$1
;
&
die_politely
(
"`# fields: ' line didn't start with DATE, but with $fields[0]"
)
&
die_politely
(
"`# fields: ' line didn't start with DATE, but with $fields[0]"
)
unless
$fields
[
0
]
=~
/date/i
;
unless
$fields
[
0
]
=~
/date/i
;
push
@labels
,
grep
(
$datasets
{
$_
},
@fields
);
push
@labels
,
grep
(
$datasets
{
$_
},
@fields
);
...
...
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