summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2018-01-20 01:50:59 +0800
committerYongqin Liu <yongqin.liu@linaro.org>2018-01-20 01:50:59 +0800
commitb9b8b65f79ac36eac89def3704f5433f438412c7 (patch)
tree10fbda82fffb1a0e900d48fa63cfbdcb7e42dbac
parentd3585b26eabe3297027471dad6497e20de110599 (diff)
improvement on bug and comments display
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
-rw-r--r--report/migrations/0017_comment_build_no_fixed.py20
-rw-r--r--report/models.py2
-rw-r--r--report/templates/test_report.html33
3 files changed, 49 insertions, 6 deletions
diff --git a/report/migrations/0017_comment_build_no_fixed.py b/report/migrations/0017_comment_build_no_fixed.py
new file mode 100644
index 0000000..a1b6966
--- /dev/null
+++ b/report/migrations/0017_comment_build_no_fixed.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.5 on 2018-01-19 16:57
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('report', '0016_auto_20180116_0549'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='comment',
+ name='build_no_fixed',
+ field=models.CharField(blank=True, default='', max_length=8),
+ ),
+ ]
diff --git a/report/models.py b/report/models.py
index d852f79..61bdad4 100644
--- a/report/models.py
+++ b/report/models.py
@@ -47,7 +47,7 @@ class Comment(models.Model):
# The build that this comment is started
build_no = models.CharField(max_length=8, default='', blank=True)
# The build that this comment is not work any more
- build_no = models.CharField(max_length=8, default='', blank=True)
+ build_no_fixed = models.CharField(max_length=8, default='', blank=True)
# for cts, test plan
# for vts, test plan, job_name
# for basic, test suite
diff --git a/report/templates/test_report.html b/report/templates/test_report.html
index ca9633e..6c68ae8 100644
--- a/report/templates/test_report.html
+++ b/report/templates/test_report.html
@@ -188,8 +188,12 @@
<td align='left'>
{% with test_info.bugs as bugs %}
{% for bug in bugs %}
- {% if not bug.build_no or bug.build_no == build_info.build_no %}
+ {% if not bug.build_no %}
<a target='_blank' href="{{ bug.link }}">{{ bug.bug_id }} </a><br/>
+ {% elif build_info.build_no > bug.build_no %}
+ {% if not bug.build_no_fixed or build_info.build_no < bug.build_no_fixed %}
+ <a target='_blank' href="{{ bug.link }}">{{ bug.bug_id }} </a><br/>
+ {% endif %}
{% endif %}
{% endfor%}
{% endwith%}
@@ -256,8 +260,12 @@ No result for basic test, or optee test, or weekly test jobs
<td align='left'>
{% with test_info.bugs as bugs %}
{% for bug in bugs %}
- {% if not bug.build_no or bug.build_no == build_info.build_no %}
+ {% if not bug.build_no %}
<a target='_blank' href="{{ bug.link }}">{{ bug.bug_id }} </a><br/>
+ {% elif build_info.build_no > bug.build_no %}
+ {% if not bug.build_no_fixed or build_info.build_no < bug.build_no_fixed %}
+ <a target='_blank' href="{{ bug.link }}">{{ bug.bug_id }} </a><br/>
+ {% endif %}
{% endif %}
{% endfor%}
{% endwith%}
@@ -361,7 +369,12 @@ 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 %}
+ <!-- for backword compability -->
<a target='_blank' href="{{ bug.link }}">{{ bug.bug_id }} </a><br/>
+ {% elif build_info.build_no > bug.build_no %}
+ {% if not bug.build_no_fixed or build_info.build_no < bug.build_no_fixed %}
+ <a target='_blank' href="{{ bug.link }}">{{ bug.bug_id }} </a><br/>
+ {% endif %}
{% endif %}
{% endfor%}
{% endwith%}
@@ -370,8 +383,13 @@ Only failures in the focused1 and focused2 test plans, and zero pass rate module
<ul>
{% with test_info.comments as comments %}
{% for comment in comments %}
- {% if not comment.build_no or comment.build_no == build_info.build_no %}
+ {% if not comment.build_no %}
+ <!-- for backword compability -->
<li>{{ comment.comment }}</li>
+ {% elif comment.build_no <= build_info.build_no %}
+ {% if not comment.build_no_fixed or comment.build_no_fixed > build_info.build_no %}
+ <li>{{ comment.comment }}</li>
+ {% endif %}
{% endif %}
{% endfor %}
{% endwith %}
@@ -467,8 +485,13 @@ No result for cts test jobs.
<td align='left'>
{% with test_info.bugs as bugs %}
{% for bug in bugs %}
- {% if not bug.build_no or bug.build_no == build_info.build_no %}
- <a target='_blank' href="{{ bug.link }}">{{ bug.bug_id }} </a><br/>
+ {% if not bug.build_no %}
+ <a target='_blank' href="{{ bug.link }}">{{ bug.bug_id }} </a><br/>
+ {% elif build_info.build_no > bug.build_no %}
+ {% if not bug.build_no_fixed or build_info.build_no < bug.build_no_fixed %}
+ <!-- bug not fixed or this build is before the fixed build no -->
+ <a target='_blank' href="{{ bug.link }}">{{ bug.bug_id }} </a><br/>
+ {% endif %}
{% endif %}
{% endfor%}
{% endwith%}