Skip to content

Commit

Permalink
Renamed status 'Awaiting Release' to 'Awaiting Publication' for embar…
Browse files Browse the repository at this point in the history
…goes
  • Loading branch information
fyvon committed Apr 19, 2024
1 parent 462574c commit a496c5c
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion curation/imports/curation.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def run_curation_import(self):

if curation_pub != None:
if study_import.study_publication.curation_status == 'E':
curation_pub.curation_status = 'Embargo Imported - Awaiting Release'
curation_pub.curation_status = 'Embargo Imported - Awaiting Publication'
else:
curation_pub.curation_status = 'Imported - Awaiting Release'
curation_pub.save()
Expand Down
4 changes: 2 additions & 2 deletions curation_tracker/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ def save_model(self, request, obj, form, change):

# Desembargo the study
if obj.embargoed == False and (not db_obj or db_obj.embargoed == True):
if obj.curation_status == 'Embargo Imported - Awaiting Release':
if obj.curation_status == 'Embargo Imported - Awaiting Publication':
if obj.doi or obj.PMID:
obj.curation_status = 'Imported - Awaiting Release'
elif obj.curation_status == 'Embargo Curated - Awaiting Import':
Expand All @@ -465,7 +465,7 @@ def save_model(self, request, obj, form, change):
if obj.curation_status == 'Curated - Awaiting Import':
obj.curation_status = 'Embargo Curated - Awaiting Import'
elif obj.curation_status == 'Imported - Awaiting Release':
obj.curation_status == 'Embargo Imported - Awaiting Release'
obj.curation_status = 'Embargo Imported - Awaiting Publication'

# Eligibility - part 2
if obj.curation_status == 'Abandoned/Ineligible':
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.2.10 on 2024-04-19 14:51

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('curation_tracker', '0004_emailtemplate'),
]

operations = [
migrations.AlterField(
model_name='curationpublicationannotation',
name='curation_status',
field=models.CharField(blank=True, choices=[('Abandoned/Ineligible', 'Abandoned/Ineligible'), ('Pending author response', 'Pending author response'), ('Awaiting L1', 'Awaiting L1'), ('Awaiting L2', 'Awaiting L2'), ('Curated - Awaiting Import', 'Curated - Awaiting Import'), ('Imported - Awaiting Release', 'Imported - Awaiting Release'), ('Released', 'Released'), ('Embargo Curated - Awaiting Import', 'Embargo Curated - Awaiting Import'), ('Embargo Imported - Awaiting Publication', 'Embargo Imported - Awaiting Publication'), ('Embargo Lifted - Awaiting Release', 'Embargo Lifted - Awaiting Release'), ('Retired', 'Retired')], default='Awaiting L1', max_length=50, null=True, verbose_name='Curation Status'),
),
]
2 changes: 1 addition & 1 deletion curation_tracker/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class CurationPublicationAnnotation(models.Model):
('Imported - Awaiting Release','Imported - Awaiting Release'),
('Released','Released'),
('Embargo Curated - Awaiting Import','Embargo Curated - Awaiting Import'),
('Embargo Imported - Awaiting Release','Embargo Imported - Awaiting Release'),
('Embargo Imported - Awaiting Publication','Embargo Imported - Awaiting Publication'),
('Embargo Lifted - Awaiting Release','Embargo Lifted - Awaiting Release'),
('Retired','Retired')
]
Expand Down
2 changes: 1 addition & 1 deletion release/scripts/run_release_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def update_curation_tracker():
curation_pub.pgp_id = pgp_id
print(' - Updating curation_status on the Curation Tracker')
if publication.curation_status == 'E':
curation_pub.curation_status = 'Embargo Imported - Awaiting Release'
curation_pub.curation_status = 'Embargo Imported - Awaiting Publication'
else:
curation_pub.curation_status = 'Released'
curation_pub.release_date = new_release_date
Expand Down

0 comments on commit a496c5c

Please sign in to comment.