SciPost Code Repository
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SciPost
Manage
Activity
Members
Labels
Plan
Issues
118
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SciPost
SciPost
Commits
296acb9a
Commit
296acb9a
authored
5 years ago
by
Jean-Sébastien Caux
Browse files
Options
Downloads
Patches
Plain Diff
Do not email Fellows with tasklist if there are no required actions
parent
33e91b02
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
submissions/management/commands/email_fellows_tasklist.py
+3
-1
3 additions, 1 deletion
submissions/management/commands/email_fellows_tasklist.py
submissions/managers.py
+4
-0
4 additions, 0 deletions
submissions/managers.py
with
7 additions
and
1 deletion
submissions/management/commands/email_fellows_tasklist.py
+
3
−
1
View file @
296acb9a
...
@@ -24,9 +24,11 @@ class Command(BaseCommand):
...
@@ -24,9 +24,11 @@ class Command(BaseCommand):
nr_potfels_to_vote_on
=
PotentialFellowship
.
objects
.
to_vote_on
(
fellow
).
count
()
nr_potfels_to_vote_on
=
PotentialFellowship
.
objects
.
to_vote_on
(
fellow
).
count
()
recs_to_vote_on
=
EICRecommendation
.
objects
.
user_must_vote_on
(
fellow
.
user
)
recs_to_vote_on
=
EICRecommendation
.
objects
.
user_must_vote_on
(
fellow
.
user
)
assignments_ongoing
=
fellow
.
editorial_assignments
.
ongoing
()
assignments_ongoing
=
fellow
.
editorial_assignments
.
ongoing
()
assignments_ongoing_with_required_actions
=
assignments_ongoing
.
with_required_actions
()
assignments_to_consider
=
fellow
.
editorial_assignments
.
invited
()
assignments_to_consider
=
fellow
.
editorial_assignments
.
invited
()
assignments_upcoming_deadline
=
assignments_ongoing
.
refereeing_deadline_within
(
days
=
7
)
assignments_upcoming_deadline
=
assignments_ongoing
.
refereeing_deadline_within
(
days
=
7
)
if
recs_to_vote_on
or
assignments_ongoing
or
assignments_to_consider
or
assignments_upcoming_deadline
:
if
(
recs_to_vote_on
or
assignments_ongoing_with_required_actions
or
assignments_to_consider
or
assignments_upcoming_deadline
):
mail_sender
=
DirectMailUtil
(
mail_sender
=
DirectMailUtil
(
'
fellows/email_fellow_tasklist
'
,
'
fellows/email_fellow_tasklist
'
,
# Render immediately, because m2m/querysets cannot be saved for later rendering:
# Render immediately, because m2m/querysets cannot be saved for later rendering:
...
...
This diff is collapsed.
Click to expand it.
submissions/managers.py
+
4
−
0
View file @
296acb9a
...
@@ -294,6 +294,10 @@ class EditorialAssignmentQuerySet(models.QuerySet):
...
@@ -294,6 +294,10 @@ class EditorialAssignmentQuerySet(models.QuerySet):
def
ongoing
(
self
):
def
ongoing
(
self
):
return
self
.
filter
(
status
=
constants
.
STATUS_ACCEPTED
)
return
self
.
filter
(
status
=
constants
.
STATUS_ACCEPTED
)
def
with_required_actions
(
self
):
ids
=
[
o
.
id
for
o
in
self
if
o
.
submission
.
cycle
.
has_required_actions
()]
return
self
.
filter
(
id__in
=
ids
)
def
accepted
(
self
):
def
accepted
(
self
):
return
self
.
filter
(
status__in
=
[
constants
.
STATUS_ACCEPTED
,
constants
.
STATUS_COMPLETED
])
return
self
.
filter
(
status__in
=
[
constants
.
STATUS_ACCEPTED
,
constants
.
STATUS_COMPLETED
])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment