Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed an issue where article publication date would in some cases not be displayed on the article page #4602

Merged
merged 2 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
author = 'Andy Byers, Mauro Sanchez & Martin Paul Eve'

# The short X.Y version
version = '1.7.3'
version = '1.7.4'
# The full version, including alpha/beta/rc tags
release = '1.7.3'
release = '1.7.4'

# -- General configuration ---------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/janeway/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
from packaging import version
__version__ = version.parse("1.7.3")
__version__ = version.parse("1.7.4")
5 changes: 3 additions & 2 deletions src/submission/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -921,16 +921,17 @@ def publication_detail_settings(journal):

@property
def has_publication_details(self):
"""Determines if an article has publication details override"""
"""Determines if an article has any publication details"""
display_date_submitted, display_date_accepted = self.publication_detail_settings(self.journal)
return(
return (
self.page_range
or self.article_number
or self.publisher_name
or self.publication_title
or self.ISSN_override
or (display_date_submitted and self.date_submitted)
or (display_date_accepted and self.date_accepted)
or self.date_published
)

@property
Expand Down
30 changes: 30 additions & 0 deletions src/utils/migrations/0039_upgrade_1_7_4.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Generated by Django 4.2.15 on 2024-10-25 14:18

from django.db import migrations, models
from django.utils import timezone

VERSION = "1.7.4"


def rollback(apps, schema_editor):
version_model = apps.get_model("utils", "Version")
latest_version = version_model.objects.get(number=VERSION, rollback=None)
latest_version.rollback = timezone.now()
latest_version.save()


def upgrade(apps, schema_editor):
version_model = apps.get_model("utils", "Version")
new_version = version_model.objects.create(number=VERSION)
new_version.save()


class Migration(migrations.Migration):

dependencies = [
('utils', '0038_upgrade_1_7_2'),
]

operations = [
migrations.RunPython(upgrade, reverse_code=rollback),
]