From 81e775c859cc557a777b295ba13eed21980a6469 Mon Sep 17 00:00:00 2001 From: Yongqin Liu Date: Wed, 14 Mar 2018 16:03:44 +0800 Subject: fix bugs and comments display logic Signed-off-by: Yongqin Liu --- report/templates/test_report.html | 85 ++++++++++++++++++++++++++++----------- report/views.py | 2 +- 2 files changed, 62 insertions(+), 25 deletions(-) diff --git a/report/templates/test_report.html b/report/templates/test_report.html index 28f3e06..e3f16cd 100644 --- a/report/templates/test_report.html +++ b/report/templates/test_report.html @@ -188,13 +188,21 @@ {% with test_info.bugs as bugs %} {% for bug in bugs %} - {% if not bug.build_no %} - {{ bug.bug_id }}
- {% elif build_info.build_no > bug.build_no %} - {% if not bug.build_no_fixed or build_info.build_no < bug.build_no_fixed %} + {% if bug.build_no_fixed and bug.build_no %} + {% if build_info.build_no >= bug.build_no and build_info.build_no < bug.build_no_fixed %} {{ bug.bug_id }}
{% endif %} - {% endif %} + {% elif bug.build_no_fixed and not bug.build_no %} + {% if build_info.build_no < bug.build_no_fixed %} + {{ bug.bug_id }}
+ {% endif %} + {% elif not bug.build_no_fixed and not bug.build_no %} + {{ bug.bug_id }}
+ {% elif not bug.build_no_fixed and bug.build_no %} + {% if build_info.build_no >= bug.build_no %} + {{ bug.bug_id }}
+ {% endif %} + {% endif %} {% endfor%} {% endwith%} @@ -260,10 +268,18 @@ No result for basic test, or optee test, or weekly test jobs {% with test_info.bugs as bugs %} {% for bug in bugs %} - {% if not bug.build_no %} - {{ bug.bug_id }}
- {% elif build_info.build_no > bug.build_no %} - {% if not bug.build_no_fixed or build_info.build_no < bug.build_no_fixed %} + {% if bug.build_no_fixed and bug.build_no %} + {% if build_info.build_no >= bug.build_no and build_info.build_no < bug.build_no_fixed %} + {{ bug.bug_id }}
+ {% endif %} + {% elif bug.build_no_fixed and not bug.build_no %} + {% if build_info.build_no < bug.build_no_fixed %} + {{ bug.bug_id }}
+ {% endif %} + {% elif not bug.build_no_fixed and not bug.build_no %} + {{ bug.bug_id }}
+ {% elif not bug.build_no_fixed and bug.build_no %} + {% if build_info.build_no >= bug.build_no %} {{ bug.bug_id }}
{% endif %} {% endif %} @@ -368,12 +384,19 @@ Only failures in the focused1 and focused2 test plans, and zero pass rate module {% with test_info.bugs as bugs %} {% for bug in bugs %} - {% if not bug.build_no or bug.build_no == build_info.build_no %} - - {{ bug.bug_id }}
- {% elif build_info.build_no > bug.build_no %} - {% if not bug.build_no_fixed or build_info.build_no < bug.build_no_fixed %} - {{ bug.bug_id }}
+ {% if bug.build_no_fixed and bug.build_no %} + {% if build_info.build_no >= bug.build_no and build_info.build_no < bug.build_no_fixed %} + {{ bug.bug_id }}
+ {% endif %} + {% elif bug.build_no_fixed and not bug.build_no %} + {% if build_info.build_no < bug.build_no_fixed %} + {{ bug.bug_id }}
+ {% endif %} + {% elif not bug.build_no_fixed and not bug.build_no %} + {{ bug.bug_id }}
+ {% elif not bug.build_no_fixed and bug.build_no %} + {% if build_info.build_no >= bug.build_no %} + {{ bug.bug_id }}
{% endif %} {% endif %} {% endfor%} @@ -383,11 +406,18 @@ Only failures in the focused1 and focused2 test plans, and zero pass rate module