Closed StephenAbbott closed 9 months ago
@StephenAbbott Just checking: From your team's point of view, would it be better / more flexible / clearer if there was a second date (or date + time) field for when the job should disappear from the site?
If you would only ever set this to 2 days after the deadline, maybe it would be annoying to fill in every time. On the other hand it would be more flexible – you could change the gap between deadline and expiration over time – and it's more explicit about the meaning and effect of each date.
@philgyford Yes. A second expiry date/time field would be preferable as it may not always be two days after the deadline that we want the job ad to disappear (for example, if an ad closed before a long weekend or public holiday). Thanks
@StephenAbbott I just recalled – this should already be possible in Wagtail.
When editing a page:
Expired pages will be set to a Status of Draft.
Assuming setting a "Go live date/time" already works, the expiry time should work too. I'm not sure if you already use the "Go live date/time"?
Aha. Did not know this functionality already existed. Will get my colleagues to test it. Thanks @philgyford
@philgyford So we've tested the Set Schedule and Expiry date/time functionality with a couple of pages this week on the staging site and nothing changed after the expiry date/time had passed https://openownership.hactar.work/admin/pages/589/edit/
@drcongo Can you check that the publish_scheduled
management command is running regularly on Staging? I think that's the thing that should make this happen?
Based on testing carried out by Open Ownership communications team in November 2023, this page expiry functionality is working as expected so I'll close the ticket
In our initial Wagtail v2 setup for the Open Ownership website, there was an expiration date field for Job pages. When set, this would remove the pages from the live site after the application date had passed.
In our current Wagtail v4 setup, we are keen to use this same functionality but are unsure how to do so. There is an Application deadline field on the Content tab for each job page:
And we can see in the CMS that job pages are given an Expired label once this Application deadline has passed:
However at the moment this expiration doesn't result in any changes on the job page. So the Open Ownership team is manually unpublishing job ads the day after the application deadline has passed.
The functionality we would like to see is for job pages to automatically be unpublished/moved to draft two days after the application deadline as most of our application deadlines are one minute to midnight at the very end of the application date given on the job pages. Is that possible in Wagtail 4?