From 8697f7a76100b702ff731b72350797bf2d290032 Mon Sep 17 00:00:00 2001 From: Andrea Marchesini Date: Mon, 11 Nov 2024 17:31:08 +0100 Subject: [PATCH] Add add-on created datetime as a column to the content review queue (#22833) --- src/olympia/reviewers/utils.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/olympia/reviewers/utils.py b/src/olympia/reviewers/utils.py index dccbc4f7ac..040b0545fd 100644 --- a/src/olympia/reviewers/utils.py +++ b/src/olympia/reviewers/utils.py @@ -206,16 +206,17 @@ class PendingRejectionTable(AddonQueueTable): class ContentReviewTable(AddonQueueTable): last_updated = tables.DateTimeColumn(verbose_name='Last Updated') + created = tables.DateTimeColumn(verbose_name='Created') title = 'Content Review' urlname = 'queue_content_review' url = r'^content_review$' permission = amo.permissions.ADDONS_CONTENT_REVIEW class Meta(AddonQueueTable.Meta): - fields = ('addon_name', 'flags', 'last_updated') + fields = ('addon_name', 'flags', 'created', 'last_updated') # Exclude base fields AddonQueueTable has that we don't want. exclude = ('last_human_review',) - orderable = False + orderable = True @classmethod def get_queryset(cls, request, **kw): @@ -226,6 +227,9 @@ class ContentReviewTable(AddonQueueTable): def render_last_updated(self, value): return naturaltime(value) if value else '' + def render_created(self, value): + return naturaltime(value) if value else '' + def _get_addon_name_url(self, record): return reverse('reviewers.review', args=['content', record.id])