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
764af1a6
Commit
764af1a6
authored
4 years ago
by
Jean-Sébastien Caux
Browse files
Options
Downloads
Patches
Plain Diff
Update email_fellows_tasklist management command
parent
209cb147
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
scipost/managers.py
+0
-4
0 additions, 4 deletions
scipost/managers.py
submissions/management/commands/email_fellows_tasklist.py
+9
-9
9 additions, 9 deletions
submissions/management/commands/email_fellows_tasklist.py
with
9 additions
and
13 deletions
scipost/managers.py
+
0
−
4
View file @
764af1a6
...
@@ -53,10 +53,6 @@ class ContributorQuerySet(models.QuerySet):
...
@@ -53,10 +53,6 @@ class ContributorQuerySet(models.QuerySet):
return
self
.
filter
(
user__is_active
=
True
,
status
=
NEWLY_REGISTERED
return
self
.
filter
(
user__is_active
=
True
,
status
=
NEWLY_REGISTERED
).
exclude
(
status
=
DOUBLE_ACCOUNT
)
).
exclude
(
status
=
DOUBLE_ACCOUNT
)
def
fellows
(
self
):
"""
TODO: NEEDS UPDATE TO NEW FELLOWSHIP RELATIONS.
"""
return
self
.
filter
(
fellowships__isnull
=
False
).
distinct
()
def
with_duplicate_names
(
self
):
def
with_duplicate_names
(
self
):
"""
"""
Returns only potential duplicate Contributors (as identified by first and
Returns only potential duplicate Contributors (as identified by first and
...
...
This diff is collapsed.
Click to expand it.
submissions/management/commands/email_fellows_tasklist.py
+
9
−
9
View file @
764af1a6
...
@@ -8,7 +8,7 @@ from ...models import EICRecommendation
...
@@ -8,7 +8,7 @@ from ...models import EICRecommendation
from
colleges.models
import
PotentialFellowship
from
colleges.models
import
PotentialFellowship
from
mails.utils
import
DirectMailUtil
from
mails.utils
import
DirectMailUtil
from
scipost
.models
import
Contributor
from
colleges
.models
import
Fellowship
class
Command
(
BaseCommand
):
class
Command
(
BaseCommand
):
...
@@ -17,15 +17,15 @@ class Command(BaseCommand):
...
@@ -17,15 +17,15 @@ class Command(BaseCommand):
help
=
'
Sends an email to Fellows with current and upcoming tasks list
'
help
=
'
Sends an email to Fellows with current and upcoming tasks list
'
def
handle
(
self
,
*
args
,
**
kwargs
):
def
handle
(
self
,
*
args
,
**
kwargs
):
fellows
=
Contributor
.
objects
.
fellows
()
fellows
hips
=
Fellowship
.
objects
.
active
()
count
=
0
count
=
0
for
fellow
in
fellows
:
for
fellow
ship
in
fellows
hips
:
nr_potfels_to_vote_on
=
PotentialFellowship
.
objects
.
to_vote_on
(
fellow
).
count
()
nr_potfels_to_vote_on
=
PotentialFellowship
.
objects
.
to_vote_on
(
fellow
ship
.
contributor
).
count
()
recs_to_vote_on
=
EICRecommendation
.
objects
.
user_must_vote_on
(
fellow
.
user
)
recs_to_vote_on
=
EICRecommendation
.
objects
.
user_must_vote_on
(
fellow
ship
.
contributor
.
user
)
assignments_ongoing
=
fellow
.
editorial_assignments
.
ongoing
()
assignments_ongoing
=
fellow
ship
.
contributor
.
editorial_assignments
.
ongoing
()
assignments_ongoing_with_required_actions
=
assignments_ongoing
.
with_required_actions
()
assignments_ongoing_with_required_actions
=
assignments_ongoing
.
with_required_actions
()
assignments_to_consider
=
fellow
.
editorial_assignments
.
invited
()
assignments_to_consider
=
fellow
ship
.
contributor
.
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_with_required_actions
if
(
recs_to_vote_on
or
assignments_ongoing_with_required_actions
or
assignments_to_consider
or
assignments_upcoming_deadline
):
or
assignments_to_consider
or
assignments_upcoming_deadline
):
...
@@ -33,8 +33,8 @@ class Command(BaseCommand):
...
@@ -33,8 +33,8 @@ class Command(BaseCommand):
'
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:
delayed_processing
=
False
,
delayed_processing
=
False
,
object
=
fellow
,
object
=
fellow
ship
.
contributor
,
fellow
=
fellow
,
fellow
=
fellow
ship
.
contributor
,
nr_potfels_to_vote_on
=
nr_potfels_to_vote_on
,
nr_potfels_to_vote_on
=
nr_potfels_to_vote_on
,
recs_to_vote_on
=
recs_to_vote_on
,
recs_to_vote_on
=
recs_to_vote_on
,
assignments_ongoing
=
assignments_ongoing
,
assignments_ongoing
=
assignments_ongoing
,
...
...
This diff is collapsed.
Click to expand it.
George Katsikas
@gkatsikas
mentioned in issue
#15 (closed)
·
1 year ago
mentioned in issue
#15 (closed)
mentioned in issue #15
Toggle commit list
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