Skip to content

Commit 97d6434

Browse files
manuel-sommerMaffoochvalentijnscholten
authored
🎉 Add number of fix_available information to test view (#13109)
* 🎉 Add number of fix_available information to test view * Update dojo/templates/dojo/view_test.html Co-authored-by: valentijnscholten <valentijnscholten@gmail.com> --------- Co-authored-by: Cody Maffucci <46459665+Maffooch@users.noreply.github.com> Co-authored-by: valentijnscholten <valentijnscholten@gmail.com>
1 parent cec647c commit 97d6434

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

dojo/templates/dojo/view_test.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ <h3 class="pull-left">
108108
<th>{% trans "Dates" %}</th>
109109
<th>{% trans "Updated" %}</th>
110110
{% if test.percent_complete > 0 %}<th>{% trans "Progress" %}</th>{% endif %}
111+
<th>{% trans "Fix Available" %}</th>
111112
<th>{% trans "Version" %}</th>
112113
{% if 'TRACK_IMPORT_HISTORY'|setting_enabled and test.test_import_set.all %}
113114
<th>
@@ -158,6 +159,7 @@ <h3 class="pull-left">
158159
</div>
159160
</td>
160161
{% endif %}
162+
<td>{{ fix_available_count }}</td>
161163
<td>{{ test.version }}</td>
162164
{% if 'TRACK_IMPORT_HISTORY'|setting_enabled and test.total_reimport_count %}
163165
<td class="text-right">{{ test.total_reimport_count }}</td>

dojo/test/views.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,12 @@ def get_findings(self, request: HttpRequest, test: Test):
120120
finding_filter_class = FindingFilterWithoutObjectLookups if filter_string_matching else FindingFilter
121121
findings = finding_filter_class(request.GET, pid=test.engagement.product.id, queryset=findings)
122122
paged_findings = get_page_items_and_count(request, prefetch_for_findings(findings.qs), 25, prefix="findings")
123+
fix_available_count = findings.qs.filter(fix_available=True).count()
123124

124125
return {
125126
"findings": paged_findings,
126127
"filtered": findings,
128+
"fix_available_count": fix_available_count,
127129
}
128130

129131
def get_note_form(self, request: HttpRequest):

0 commit comments

Comments
 (0)