Skip to content
Snippets Groups Projects
Commit 52407ddb authored by Nico Vermaas's avatar Nico Vermaas
Browse files

Merge branch 'SDC-933-QA-Process' into 'master'

"suspended" and "discarded" tasks

See merge request !289
parents 1a242fd6 029a089e
No related branches found
No related tags found
2 merge requests!290pull in the newest changes in master,!289"suspended" and "discarded" tasks
Pipeline #47219 passed
......@@ -10,7 +10,7 @@ logger = logging.getLogger(__name__)
# constants
datetime_format_string = '%Y-%m-%dT%H:%M:%SZ'
verified_statusses = ['stored','validated','scrubbed','archived','finished']
verified_statusses = ['stored','validated','scrubbed','archived','finished','suspended','discarded']
class Workflow(models.Model):
description = models.CharField(max_length=500, blank=True, null=True)
......
......@@ -724,6 +724,11 @@ def construct_inspectionplots(task,source='task_id'):
tasks = Task.objects.filter(sas_id=sas_id)
for task in tasks:
# skip 'suspended' and 'discarded' tasks
if task.status in ['suspended','discarded']:
continue
try:
results += '<tr style="background-color:#7EB1C4"><td colspan="3"><b>Task ' + str(task.id) + '</b></td></tr>'
plots = task.quality_json["plots"]
......@@ -765,6 +770,11 @@ def construct_summary(task):
tasks = Task.objects.filter(sas_id=sas_id)
for task in tasks:
# skip 'suspended' and 'discarded' tasks
if task.status in ['suspended', 'discarded']:
continue
results += '<tr style="background-color:#7EB1C4"><td colspan="3"><b>Task ' + str(task.id) + '</b></td></tr>'
# find the plots in the quality json structure
......
......@@ -34,7 +34,7 @@
{% include 'taskdatabase/pagination.html' %}
</div>
</div>
<p class="footer"> Version 4 april 2023
<p class="footer"> Version 6 April 2023
</div>
......
......@@ -9,4 +9,6 @@
<a href="{% url 'task-details-setstatus' task.pk 'archived' %}" class="btn btn-warning btn-sm" role="button"><i class="fas fa-sync-alt"></i> archived</a>&nbsp;
<a href="{% url 'task-details-setstatus' task.pk 'finished' %}" class="btn btn-warning btn-sm" role="button"><i class="fas fa-sync-alt"></i> finished</a>&nbsp;
<a href="{% url 'task-details-setstatus' task.pk 'suspended' %}" class="btn btn-warning btn-sm" role="button"><i class="fas fa-sync-alt"></i> suspended</a>&nbsp;
<!--
<a href="{% url 'task-details-setstatus' task.pk 'discard' %}" class="btn btn-danger btn-sm" role="button"><i class="fas fa-sync-alt"></i> discard</a>&nbsp;
-->
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment