Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

(936) Fix weird entries in the change history #9995

Merged

Conversation

pezholio
Copy link
Contributor

@pezholio pezholio commented Feb 27, 2025

Trello card: https://trello.com/c/gW7ssapF/936-weird-entries-in-the-change-history

This ensures that when we clone an edition, we don't copy the change notes, as well as updating the history when adding a new embedded object

Screenshot

image

@pezholio pezholio force-pushed the content-modelling/936-weird-entries-in-the-change-history branch from c12ccd8 to e6750c8 Compare February 27, 2025 11:24
@pezholio pezholio requested a review from Harriethw February 27, 2025 11:27
@pezholio pezholio force-pushed the content-modelling/936-weird-entries-in-the-change-history branch from e6750c8 to 53c621e Compare February 27, 2025 13:38
@pezholio pezholio force-pushed the content-modelling/936-weird-entries-in-the-change-history branch 2 times, most recently from 549048b to 60c696a Compare February 27, 2025 15:30
@pezholio pezholio requested a review from Harriethw February 27, 2025 16:10
@@ -10,6 +10,10 @@ class Version < ApplicationRecord
def field_diffs
self[:field_diffs] ? ContentBlock::DiffItem.from_hash(self[:field_diffs]) : {}
end

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a stray method left over from a refactor?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, yes!

This will allow us to capture additional information about an when an
embedded object has been created.
This adds a virutal field to allow us to pass information about an event
to a version.
@pezholio pezholio force-pushed the content-modelling/936-weird-entries-in-the-change-history branch from 60c696a to 5a69782 Compare February 27, 2025 16:34
@pezholio pezholio requested a review from Harriethw February 27, 2025 16:34
This checks for the presence of the relevant event details, which we
can then use to generate the history in the next commit
@pezholio pezholio force-pushed the content-modelling/936-weird-entries-in-the-change-history branch from 5a69782 to c253925 Compare February 27, 2025 16:39
@pezholio pezholio enabled auto-merge February 27, 2025 16:44
@pezholio pezholio merged commit 30403cc into main Feb 27, 2025
19 checks passed
@pezholio pezholio deleted the content-modelling/936-weird-entries-in-the-change-history branch February 27, 2025 16:45
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants