Skip to content
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

Feat/199 unpublished doc versions published #209

Merged
merged 2 commits into from
Jul 22, 2024

Conversation

tkrch
Copy link
Collaborator

@tkrch tkrch commented Jul 19, 2024

Motivation

Which issue does this fix? Fixes #199.

  • support for migration of DocumentPublushFrom and DocumentPublishTo fields

@tkrch tkrch self-assigned this Jul 19, 2024
@@ -261,7 +291,7 @@ protected override IEnumerable<IUmtModel> MapInternal(CmsTreeMapperSource source
{
documentModifiedByUserGuid = modifiedByUserGuid;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this whitespace was not intended.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

{ DocumentPublishedVersionHistoryID: null, DocumentCheckedOutVersionHistoryID: null } => VersionStatus.Published,
{ DocumentPublishedVersionHistoryID: { } pubId, DocumentCheckedOutVersionHistoryID: { } chId } when pubId <= chId => VersionStatus.Published,
{ DocumentPublishedVersionHistoryID: null, DocumentCheckedOutVersionHistoryID: not null } => VersionStatus.InitialDraft,
_ => draftMigrated ? VersionStatus.Published : VersionStatus.InitialDraft
};

DateTime? scheduledPublishWhen = null;
DateTime? scheduleUnpublishWhen = null;
if (cmsDocument.DocumentPublishFrom is { } publishFrom)
Copy link
Contributor

Choose a reason for hiding this comment

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

Separate this condition block from the rest of the code above with blank line

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@@ -2,6 +2,8 @@

using CMS.ContentEngine;
using CMS.ContentEngine.Internal;
using CMS.Core;
using CMS.Core.Internal;
Copy link
Contributor

Choose a reason for hiding this comment

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

Integrating the *.Internal API is not a best practice. This API is not officially supported, and if something changes to it, we don't consider it a breaking change. As a result, this change can be included in any hotfix, which means that any hotfix can now break our integration.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it is there because of constant ReusableFieldSchemaConstants.SCHEMA_IDENTIFIER_KEY - if i hardcode it, then i loose chance to know that it was removed or changed - i need this, because manipulation with reusable field schemas.

If there is any public API that can get all fields out of reusable field schema i can drop this implementation and use it (and API that can determine which form field are from reusable field schema in one particular data class)

@tkrch tkrch force-pushed the feat/199_unpublished_doc_versions_published branch from f9f70c5 to a1612d2 Compare July 22, 2024 15:26
@tkrch tkrch merged commit 45d664a into rls/v1.1.0 Jul 22, 2024
@tkrch tkrch deleted the feat/199_unpublished_doc_versions_published branch July 22, 2024 15:27
michalJakubis pushed a commit that referenced this pull request Jul 24, 2024
* MT-28 XbyK upgrade 29.2.0 & obsolete configuration removed

- breaking changes on MediatR resolved
- obsolete project cleared
- upgrade of solution dependencies

* MT-28 legacy XbyK DB model regeneration + implied fixes

* MT-17 migration of documents with non-unique DocumentGuid

* MT-17 non-unique DocumentGUID & NodeGUID support

* MT-17 cleanup

* #184 deprecation of XbKConnectionString

* #184 deprecation of XbKConnectionString - md file update

* #198 migration of media file refactor; fails for member users resoved

* confict resolving in relation to master branch

* solution reformat to match master formatting

* eol crlf

* dotnet format autofix

* merge conflicts fix

* .editorconfig update & global reformat

* reformat and code cleanup

* dotnet format uncommented

* Feat/199 unpublished doc versions published (#209)

* document PublishTo & PublishFrom migration path support

* whitespace corrections

---------

Co-authored-by: Tomáš Krch <tomas@krch.tech>

* naming conventions update, obsolete class removal

* handling of multiple attachments with same guid in source instance - meaningful warning message

---------

Co-authored-by: Tomáš Krch <tomas@krch.tech>
Co-authored-by: fialafilip <99190657+fialafilip@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants