-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optionally set an Author on an Edition #2919
Optionally set an Author on an Edition #2919
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good. A couple of things that might be good to address, and a couple of other more minor suggestions. I might also quickly run the broader idea past the team in our dev chat this afternoon
The labels/first lines of each of the comments here are following the Conventional Comments format, which I'm trying out after watching a useful DevOpsDays London talk
content_schemas/formats/shared/definitions/publishing_api_base.jsonnet
Outdated
Show resolved
Hide resolved
94eba2d
to
c2590b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a question about the field name/intended use, and a bit of leftover code that can be removed
content_schemas/formats/shared/definitions/publishing_api_base.jsonnet
Outdated
Show resolved
Hide resolved
content_schemas/formats/shared/default_properties/publisher.jsonnet
Outdated
Show resolved
Hide resolved
This takes the UUID of the user who last edited the edition.
c2590b7
to
eeb4a2e
Compare
db/migrate/20241017080126_add_last_edited_by_editor_id_to_editions.rb
Outdated
Show resolved
Hide resolved
This ensures this value gets set if it is present. I’ve added some shared exampes to the new edition and previous draft integration specs, as these seemed like the best places for them to go.
This is currently only internal to the Publishing API, so does not need to be sent upstream.
eeb4a2e
to
cc2a00c
Compare
The editions table in the upstream Publishing API database has a new column, `last_edited_by_editor_id`, created in alphagov/publishing-api#2919. This broke the data pipeline, because the BigQuery schema of that table rejected the new column. The new column contains sensitive data, so it is only included in tables in the `publishing-api` and `private` datasets, which most users cannot access. It is explicitly omitted from the query that puts the data into more accessible datasets.
In Content Modelling, when viewing content that is dependent of a content block, we'd like to be able to see who last edited that content, so publishers can liaise with the "owner" of that content if, for example, a change to a content block will alter the meaning of the dependent content.
As the Content Block Manager is publishing app agnostic, we currently have no way of knowing who last touched a piece of content, as this information is only stored within the publishing app itself.
This PR adds a new
last_edited_by
field which can optionally be sent to the Publishing API. In future this will allow us to use the Embedded Content Endpoint to return information about authors (if it exists).The next step will be to update the presenters in the various publishing apps - trialing with Whitehall first.