Skip to content

Add a rake task to reslug an edition [WHIT-3475] #11485

Open
eYinka wants to merge 1 commit into
mainfrom
add-rake-task-to-reslug-an-edition
Open

Add a rake task to reslug an edition [WHIT-3475] #11485
eYinka wants to merge 1 commit into
mainfrom
add-rake-task-to-reslug-an-edition

Conversation

@eYinka
Copy link
Copy Markdown
Contributor

@eYinka eYinka commented May 21, 2026

We had a case where a superseded edition had the same slug as a new document. This meant that the new document could not be published under the ideal slug until the superseded edition frees the slug. The new document's slug had had '--2' appended to it, which is not ideal.

I've now added a rake task to reslug an edition, which will allow us to fix issues like this. Instead of receiving the old slug as an argument, the task receives the edition's ID, just to be sure we're reslugging the intended edition.

Usage: bundle exec rake reslug:edition[12345,new-slug]

JIRA


⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

This application is owned by the Whitehall Experience team. Please let us know in #govuk-whitehall-experience-tech when you raise any PRs.

Follow these steps if you are doing a Rails upgrade.

We had a case where a superseded edition had the same slug as a new document. This meant that the new document could not be published under the ideal slug until the superseded edition frees the slug. The new document's slug had had '--2' appended to it, which is not ideal.

I've now added a rake task to reslug an edition, which will allow us to fix issues like this.
Instead of receiving the old slug as an argument, the task receives the edition's ID, just to be sure we're reslugging the intended edition.

Usage: `bundle exec rake reslug:edition[12345,new-slug]`
@eYinka eYinka force-pushed the add-rake-task-to-reslug-an-edition branch from c27df13 to 83144e9 Compare May 21, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant