Remove a change note
What is a change note?
An Edition in Publishing API can have just one
change_note, which is public-facing. The Publishing API creates a list of all the change notes from all versions of the edition and presents them to the Content Store. You can read more about this in the Publishing API docs.
In Whitehall, an Edition can also have multiple editorial remarks (otherwise known as internal notes). These are visible only in Whitehall Admin.
Change note rake tasks
Rake Tasks exist in both Publishing API and Whitehall to quickly remove change notes for a document. The tasks take a content id, content locale and the text of the change note.
There are two interfaces for dry and real runs, to ensure the correct change note is being targetted before removing it.
It performs a fuzzy-search of the change note text, and will return the first best match. So searching for generic words such as “Update” may not return the exact ChangeNote you desire. It is advised to use the dry run first to ensure the correct ChangeNote will be deleted.
You first need to determine whether the request is referring to a
change_note (public-facing) or an
editorial_remark (only visible in Whitehall Admin).
Remove a Change Note from Whitehall
To delete a change note in Whitehall, visit the following URL, replacing
<edition-id> with the ID of the edition:
Remove an Editorial Remark from Whitehall
- Obtain the content ID of the document on which the change note was created.
This document will contain multiple editions. You need to extract the
editorial_remarkfrom these editions.
- Create a data migration in Whitehall docs here
- In the data migration, search for the document by the content ID and
editorial_remarkthat contains the text you are looking to delete.
- If such an editorial remark is present, then destroy the
editorial_remarkand check that it is no longer displayed.
Individual publishing apps may have their own equivalent of this task. If possible, remove change notes in the specific publishing application. Use this Publishing API task only if no alternatives exist.
$ bundle exec rake 'data_hygiene:remove_change_note:dry[content_id,locale,change note text]'
This attempts to locate the selected change note for the content, and if found, report to the user the change note object that would have been removed.
$ bundle exec rake 'data_hygiene:remove_change_note:real[content_id,locale,change note text]'
This will actually delete the selected change note and re-represent to the content store, also updating the edition history.