Revert "Remove redundant rake task [WHIT-2999]"#11127
Revert "Remove redundant rake task [WHIT-2999]"#11127catalinailie wants to merge 2 commits intomainfrom
Conversation
ryanb-gds
left a comment
There was a problem hiding this comment.
Maybe we should keep this around for a while 😅
ryanb-gds
left a comment
There was a problem hiding this comment.
Not sure if we want to redirect these or just mark them gone?
| # | ||
| task :unpublish_and_redirect, %i[file redirect_url] => :environment do |_task, args| | ||
| file = args[:file] | ||
| redirect_url = args[:redirect_url] |
There was a problem hiding this comment.
Is this what we want, to redirect all the announcements to a single URL?
There was a problem hiding this comment.
Good point. No, we need different redirect URL for each announcement.
There was a problem hiding this comment.
Haven't checked all of them, but is it possible to unpublish without providing a redirect url?
There was a problem hiding this comment.
Yes, you can send an unpublish request to Publishing API with a type value of "gone". See https://docs.publishing.service.gov.uk/repos/publishing-api/api.html#post-v2contentcontent_idunpublish
There was a problem hiding this comment.
I looked over the announcements and all of them have a publication. So I just tweaked a bit the task to accept a redirect url for each statistics announcement id
Reverts #11089
We will need this task for unpublishing more statistics announcements