Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Project Allocator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
edtech
Project Allocator
Merge requests
!18
Support specific deadline for each category of project.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Support specific deadline for each category of project.
specific-deadline-for-category
into
master
Overview
2
Commits
7
Pipelines
2
Changes
14
Merged
Andrea Callia D'Iddio
requested to merge
specific-deadline-for-category
into
master
2 years ago
Overview
2
Commits
7
Pipelines
2
Changes
2
Expand
As per title
0
0
Merge request reports
Compare
version 1
version 1
604f836b
2 years ago
master (base)
and
latest version
latest version
1ae2df0c
7 commits,
2 years ago
version 1
604f836b
5 commits,
2 years ago
Show latest version
2 files
+
10
−
11
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
app/views/staff.py
+
10
−
9
Options
@@ -131,10 +131,12 @@ def delete_project(project_id):
project
.
category
).
is_deadline_expired_for_staff
:
flash
(
messages
.
DEADLINE_EXPIRED_FOR_STAFF
)
elif
(
(
project
is
not
None
)
and
(
project
.
category
in
category_codes
)
and
(
project
.
proposer
==
current_user
.
username
)
elif
all
(
(
(
project
is
not
None
),
(
project
.
category
in
category_codes
),
(
project
.
proposer
==
current_user
.
username
),
)
):
project
.
deleted
=
datetime
.
utcnow
()
db
.
session
.
commit
()
@@ -306,16 +308,15 @@ def update_ranking():
)
deadline_errors
=
False
for
shortlisting
in
current_shortlist
:
current_ranking
=
shortlisting
.
staff_ranking
new_ranking
=
shortlisting_ids
.
index
(
shortlisting
.
id
)
+
1
if
Category
.
query
.
get
(
Project
.
query
.
get
(
shortlisting
.
project_id
).
category
).
is_deadline_expired_for_staff
:
if
(
shortlisting
.
staff_ranking
!=
shortlisting_ids
.
index
(
shortlisting
.
id
)
+
1
):
if
current_ranking
!=
new_ranking
:
deadline_errors
=
True
else
:
shortlisting
.
staff_ranking
=
shortlisting_ids
.
index
(
shortlisting
.
id
)
+
1
shortlisting
.
staff_ranking
=
new_ranking
if
deadline_errors
:
flash
(
messages
.
DEADLINE_EXPIRED_FOR_STAFF
)
return
redirect
(
url_for
(
f
"
{
current_user
.
role
}
.projects
"
))
Loading