contentful-migration icon indicating copy to clipboard operation
contentful-migration copied to clipboard

Publish only changed and published entries when migrating content

Open tharders opened this issue 2 years ago • 2 comments

Expected Behavior

When running a migration that changes content we normally want all the entries that are public available (that once have been published) to have the changes. There should be an option for shouldPublish to only publish entries that have a published version, since entries in "DRAFT" state should not be published.

Actual Behavior

When running a migration with shouldPublish="preserve" the "PUBLISHED" entries will be automatically published and have the changes. While the "CHANGED" entries will not be published and the old published version will not have the changes. When running a migration with shouldPublish=true all entries, including the 'DRAFT', are published, which is not desired. It is not possible to publish only "CHANGED" and "PUBLISHED" entries.

Possible Solution

Add a new option for shouldPublish to allow publishing of only the entries in "PUBLISHED" and "CHANGED" state.

For example something like shouldPublish="oncePublished" or shouldPublish="changedAndPublished"

tharders avatar Oct 11 '22 08:10 tharders

Something like this would help us a lot as well.

pellebjerkestrand avatar Jul 19 '23 08:07 pellebjerkestrand

Bump on this still outstanding issue. It's really unfortunate that the library only changes the latest version rather than both the published version and a changed version. We would like to rely on scripting updates to entries to maintain consistency with the content model. Without this capability, we can't.

ecline123 avatar Oct 04 '23 16:10 ecline123