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
9782d3fe
Commit
9782d3fe
authored
Apr 12, 2005
by
gerv%gerv.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 278268 - make Grand Total line not appear if data set add fails. Patch by…
Bug 278268 - make Grand Total line not appear if data set add fails. Patch by colin.ogilvie; r=gerv, a=justdave.
parent
4d1306f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
Chart.pm
Bugzilla/Chart.pm
+15
-10
No files found.
Bugzilla/Chart.pm
View file @
9782d3fe
...
...
@@ -115,16 +115,11 @@ sub add {
my
$self
=
shift
;
my
@series_ids
=
@_
;
# If we are going from < 2 to >= 2 series, add the Grand Total line.
if
(
!
$self
->
{
'gt'
})
{
my
$current_size
=
scalar
(
$self
->
getSeriesIDs
());
if
(
$current_size
<
2
&&
$current_size
+
scalar
(
@series_ids
)
>=
2
)
{
$self
->
{
'gt'
}
=
1
;
}
}
# Get the current size of the series; required for adding Grand Total later
my
$current_size
=
scalar
(
$self
->
getSeriesIDs
());
# Count the number of added series
my
$added
=
0
;
# Create new Series and push them on to the list of lines.
# Note that new lines have no label; the display template is responsible
# for inventing something sensible.
...
...
@@ -133,6 +128,16 @@ sub add {
if
(
$series
)
{
push
(
@
{
$self
->
{
'lines'
}},
[
$series
]);
push
(
@
{
$self
->
{
'labels'
}},
""
);
$added
++
;
}
}
# If we are going from < 2 to >= 2 series, add the Grand Total line.
if
(
!
$self
->
{
'gt'
})
{
if
(
$current_size
<
2
&&
$current_size
+
$added
>=
2
)
{
$self
->
{
'gt'
}
=
1
;
}
}
}
...
...
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