diff --git a/scipost/templates/partials/scipost/personal_page/editorial_actions.html b/scipost/templates/partials/scipost/personal_page/editorial_actions.html index 171832ee64dba0378ce8c7bf867b4d8c36e7577b..4114a8d9014396dbc8a004575c63b06883cce92c 100644 --- a/scipost/templates/partials/scipost/personal_page/editorial_actions.html +++ b/scipost/templates/partials/scipost/personal_page/editorial_actions.html @@ -60,6 +60,7 @@ <h3>Info</h3> <ul> <li><a href="{% url 'submissions:editorial_workflow' %}">How-to guide: summary of the editorial workflow</a></li> + <li><a href="{% url 'submissions:monitor' %}">Submissions monitor (current workflow timescales)</a></li> </ul> <h3>Submissions assignments</h3> diff --git a/submissions/templates/submissions/monitor.html b/submissions/templates/submissions/monitor.html index 104fb8c6a41e018849245d9e9a0fe060dce59903..a2bc948ce45a8663a39cf2d723d373fb91a57b4a 100644 --- a/submissions/templates/submissions/monitor.html +++ b/submissions/templates/submissions/monitor.html @@ -15,11 +15,14 @@ <div class="row"> <div class="col"> <h1 class="highlight">Submissions Monitor</h1> + <p>This page provides information of the timescales associated to various phases of the editorial workflow.</p> </div> </div> <div class="row"> <div class="col"> - <h2 class="highlight">Status: unassigned (awaiting editor assignment)</h2> + <h2 class="highlight">Screening phase (finding an EIC)</h2> + <p>Dataset: Submissions with status <em>unassigned (awaiting editor assignment)</em></p> + <p>Any fields in <span class="bg-danger text-white px-1">red</span> or <span class="bg-warning text-white px-1">orange</span> background need more Fellows in order to accelerate processing.</p> <table class="table"> <tr> <td>Legend</td> @@ -37,7 +40,7 @@ <th>Avg waiting days</th> <th>Max waiting days</th> </thead> - {% for entry in timescales_unassigned %} + {% for entry in timescales_screening %} <tr{% if entry.avg_waiting_days > 10 %} class="bg-danger text-white"{% elif entry.avg_waiting_days > 5 %} class="bg-warning text-white"{% else %} class="bg-success text-white"{% endif %}> <td>{{ entry.acad_field }}</td> <td>{{ entry.specialty }}</td> @@ -53,10 +56,11 @@ <div class="row"> <div class="col"> - <h2 class="highlight">Status: accepted (not yet published)</h2> - <p>Time from submission to acceptance, including all resubmissions).</p> - <p>This is not an accurate evaluation of the rapidity of processing at SciPost, since - the time to resubmit is counted.</p> + <h2 class="highlight">From original submission to acceptance</h2> + <p>Dataset: Submissions with status <em>accepted (not yet published)</em>.</p> + <p>Total time from original submission to acceptance, including all resubmissions.</p> + <p>This is not an accurate reflection of the rapidity of processing at SciPost, since + the time for authors to resubmit is counted in.</p> <table class="table"> <tr> <td>Legend</td> @@ -74,7 +78,7 @@ <th>Avg processing days</th> <th>Max processing days</th> </thead> - {% for entry in timescales_accepted %} + {% for entry in timescales_original_submission_to_acceptance %} <tr{% if entry.avg_waiting_days > 180 %} class="bg-danger text-white"{% elif entry.avg_waiting_days > 90 %} class="bg-warning text-white"{% else %} class="bg-success text-white"{% endif %}> <td>{{ entry.acad_field }}</td> <td>{{ entry.specialty }}</td> diff --git a/submissions/views.py b/submissions/views.py index a5b995151756aab762e153ec82c999a8e5aa8958..88517b68cc1f1f212edc74c3126627fa5be3f3b7 100644 --- a/submissions/views.py +++ b/submissions/views.py @@ -2301,23 +2301,23 @@ def submissions_processing_timescales(submissions, phase): number = len(submissions_in_spec) if number > 0: waiting_days = 0 + total_waiting_days = 0 max_waiting_days = 0 for sub in submissions_in_spec.all(): if phase == 'screening': - waiting_days += workdays_between(sub.submission_date, now) - elif phase == 'acceptance': - waiting_days += workdays_between(sub.original_submission_date, sub.acceptance_date) + waiting_days = workdays_between(sub.submission_date, now) + elif phase == 'original_submission_to_acceptance': + waiting_days = workdays_between(sub.original_submission_date, sub.acceptance_date) + total_waiting_days += waiting_days max_waiting_days = max(waiting_days, max_waiting_days) timescales.append({ 'acad_field': acad_field, 'specialty': specialty, 'number': number, - 'waiting_days': waiting_days, - 'avg_waiting_days': round(waiting_days/number, 2), + 'waiting_days': total_waiting_days, + 'avg_waiting_days': round(total_waiting_days/number, 2), 'max_waiting_days': max_waiting_days }) - - return sorted(timescales, key=lambda tup: tup['number'], reverse=True) @@ -2327,8 +2327,8 @@ def monitor(request): """ # Compute stats for all submissions under processing context = { - 'timescales_unassigned': submissions_processing_timescales(Submission.objects.unassigned(), 'screening'), - 'timescales_accepted': submissions_processing_timescales( - Submission.objects.accepted(), 'acceptance'), + 'timescales_screening': submissions_processing_timescales(Submission.objects.unassigned(), 'screening'), + 'timescales_original_submission_to_acceptance': submissions_processing_timescales( + Submission.objects.accepted(), 'original_submission_to_acceptance'), } return render(request, 'submissions/monitor.html', context)