summaryrefslogtreecommitdiffstats
path: root/extensions/ProductDashboard/template
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2013-04-11 16:16:09 +0200
committerDave Lawrence <dlawrence@mozilla.com>2013-04-11 16:16:09 +0200
commitd69ae9f2cc2d243a79dd0e4dee38dd44bccab8c3 (patch)
tree9a4668739c8b581cdfb325568e83bd5007d92a6d /extensions/ProductDashboard/template
parentd89e6ea5025094d0ee1561e9ba2ff739e59df26c (diff)
downloadbugzilla-d69ae9f2cc2d243a79dd0e4dee38dd44bccab8c3.tar.gz
bugzilla-d69ae9f2cc2d243a79dd0e4dee38dd44bccab8c3.tar.xz
Bug 860657 - 'Illegal division by zero' on product dashboard when the product has zero bugs
Diffstat (limited to 'extensions/ProductDashboard/template')
-rw-r--r--extensions/ProductDashboard/template/en/default/pages/productdashboard/summary.html.tmpl32
1 files changed, 16 insertions, 16 deletions
diff --git a/extensions/ProductDashboard/template/en/default/pages/productdashboard/summary.html.tmpl b/extensions/ProductDashboard/template/en/default/pages/productdashboard/summary.html.tmpl
index 5afba25a9..30b6f3dca 100644
--- a/extensions/ProductDashboard/template/en/default/pages/productdashboard/summary.html.tmpl
+++ b/extensions/ProductDashboard/template/en/default/pages/productdashboard/summary.html.tmpl
@@ -11,36 +11,36 @@
// global counts
PD.summary.bug_counts = [
- {
+ {
name: "Total [% terms.Bugs %]",
count: [% total_bugs || 0 FILTER js %],
- percentage: 100,
- link: '<a href="[% bug_link_all FILTER js %]">Link</a>',
- },
+ percentage: [% total_bugs ? "100" : "0" %],
+ link: '<a href="[% bug_link_all FILTER js %]">Link</a>',
+ },
{
name: "Open [% terms.Bugs %]",
count: [% total_open_bugs || 0 FILTER js %],
percentage: [% open_bugs_percentage FILTER js %],
- link: '<a href="[% bug_link_open FILTER js %]">Link</a>',
+ link: '<a href="[% bug_link_open FILTER js %]">Link</a>',
},
{
- name: "Closed [% terms.Bugs %]",
+ name: "Closed [% terms.Bugs %]",
count: [% total_closed_bugs || 0 FILTER js %],
percentage: [% closed_bugs_percentage FILTER js %],
link: '<a href="[% bug_link_closed FILTER js %]">Link</a>',
}
];
-
+
// Status counts
PD.summary.status_counts = [
[% FOREACH col = by_status %]
[% NEXT IF col.0 == 'CLOSED' %]
{
- name: "[% col.0 FILTER js %]",
+ name: "[% col.0 FILTER js %]",
count: [% col.1 || 0 FILTER js %],
- percentage: [% col.2 || 0 FILTER js %],
+ percentage: [% col.2 || 0 FILTER js %],
link: '<a href="[% bug_link_all FILTER js %]&amp;bug_status=[% col.0 FILTER uri FILTER js %]">Link</a>'
- },
+ },
[% END %]
];
@@ -48,11 +48,11 @@
PD.summary.priority_counts = [
[% FOREACH col = by_priority %]
{
- name: "[% col.0 FILTER js %]",
+ name: "[% col.0 FILTER js %]",
count: [% col.1 || 0 FILTER js %],
- percentage: [% col.2 || 0 FILTER js %],
+ percentage: [% col.2 || 0 FILTER js %],
link: '<a href="[% bug_link FILTER js %]&amp;priority=[% col.0 FILTER uri FILTER js %]">Link</a>'
- },
+ },
[% END %]
];
@@ -60,11 +60,11 @@
PD.summary.severity_counts = [
[% FOREACH col = by_severity %]
{
- name: "[% col.0 FILTER js %]",
+ name: "[% col.0 FILTER js %]",
count: [% col.1 || 0 FILTER js %],
- percentage: [% col.2 || 0 FILTER js %],
+ percentage: [% col.2 || 0 FILTER js %],
link: '<a href="[% bug_link FILTER js %]&amp;bug_severity=[% col.0 FILTER uri FILTER js %]">Link</a>'
- },
+ },
[% END %]
];