diff --git a/src/Umbraco.Core/Models/IContentType.cs b/src/Umbraco.Core/Models/IContentType.cs
index a01e612887..a689da4c05 100644
--- a/src/Umbraco.Core/Models/IContentType.cs
+++ b/src/Umbraco.Core/Models/IContentType.cs
@@ -4,12 +4,16 @@ using Umbraco.Cms.Core.Models.ContentEditing;
namespace Umbraco.Cms.Core.Models
{
- [Obsolete("This will be merged into IContentType in Umbraco 10")]
+ ///
+ /// Defines a content type that contains a history cleanup policy.
+ ///
+ [Obsolete("This will be merged into IContentType in Umbraco 10.")]
public interface IContentTypeWithHistoryCleanup : IContentType
{
///
- /// Gets or Sets the history cleanup configuration
+ /// Gets or sets the history cleanup configuration.
///
+ /// The history cleanup configuration.
HistoryCleanup HistoryCleanup { get; set; }
}
diff --git a/src/Umbraco.Core/Models/Mapping/ContentTypeMapDefinition.cs b/src/Umbraco.Core/Models/Mapping/ContentTypeMapDefinition.cs
index debaa976c5..3625e90a14 100644
--- a/src/Umbraco.Core/Models/Mapping/ContentTypeMapDefinition.cs
+++ b/src/Umbraco.Core/Models/Mapping/ContentTypeMapDefinition.cs
@@ -185,20 +185,15 @@ namespace Umbraco.Cms.Core.Models.Mapping
{
target.HistoryCleanup = new HistoryCleanupViewModel
{
- PreventCleanup = sourceWithHistoryCleanup.HistoryCleanup.PreventCleanup,
- KeepAllVersionsNewerThanDays =
- sourceWithHistoryCleanup.HistoryCleanup.KeepAllVersionsNewerThanDays,
- KeepLatestVersionPerDayForDays =
- sourceWithHistoryCleanup.HistoryCleanup.KeepLatestVersionPerDayForDays,
- GlobalKeepAllVersionsNewerThanDays =
- _contentSettings.ContentVersionCleanupPolicy.KeepAllVersionsNewerThanDays,
- GlobalKeepLatestVersionPerDayForDays =
- _contentSettings.ContentVersionCleanupPolicy.KeepLatestVersionPerDayForDays,
+ PreventCleanup = sourceWithHistoryCleanup.HistoryCleanup?.PreventCleanup ?? false,
+ KeepAllVersionsNewerThanDays = sourceWithHistoryCleanup.HistoryCleanup?.KeepAllVersionsNewerThanDays,
+ KeepLatestVersionPerDayForDays = sourceWithHistoryCleanup.HistoryCleanup?.KeepLatestVersionPerDayForDays,
+ GlobalKeepAllVersionsNewerThanDays = _contentSettings.ContentVersionCleanupPolicy.KeepAllVersionsNewerThanDays,
+ GlobalKeepLatestVersionPerDayForDays = _contentSettings.ContentVersionCleanupPolicy.KeepLatestVersionPerDayForDays,
GlobalEnableCleanup = _contentSettings.ContentVersionCleanupPolicy.EnableCleanup
};
}
-
target.AllowCultureVariant = source.VariesByCulture();
target.AllowSegmentVariant = source.VariesBySegment();
target.ContentApps = _commonMapper.GetContentApps(source);
diff --git a/src/Umbraco.Infrastructure/Packaging/PackageDataInstallation.cs b/src/Umbraco.Infrastructure/Packaging/PackageDataInstallation.cs
index 5c9942f945..defea0ea51 100644
--- a/src/Umbraco.Infrastructure/Packaging/PackageDataInstallation.cs
+++ b/src/Umbraco.Infrastructure/Packaging/PackageDataInstallation.cs
@@ -814,9 +814,47 @@ namespace Umbraco.Cms.Infrastructure.Packaging
UpdateContentTypesPropertyGroups(contentType, documentType.Element("Tabs"));
UpdateContentTypesProperties(contentType, documentType.Element("GenericProperties"));
+ if (contentType is IContentTypeWithHistoryCleanup withCleanup)
+ {
+ UpdateHistoryCleanupPolicy(withCleanup, documentType.Element("HistoryCleanupPolicy"));
+ }
+
return contentType;
}
+ private void UpdateHistoryCleanupPolicy(IContentTypeWithHistoryCleanup withCleanup, XElement element)
+ {
+ if (element == null)
+ {
+ return;
+ }
+
+ withCleanup.HistoryCleanup ??= new Core.Models.ContentEditing.HistoryCleanup();
+
+ if (bool.TryParse(element.Attribute("preventCleanup")?.Value, out var preventCleanup))
+ {
+ withCleanup.HistoryCleanup.PreventCleanup = preventCleanup;
+ }
+
+ if (int.TryParse(element.Attribute("keepAllVersionsNewerThanDays")?.Value, out var keepAll))
+ {
+ withCleanup.HistoryCleanup.KeepAllVersionsNewerThanDays = keepAll;
+ }
+ else
+ {
+ withCleanup.HistoryCleanup.KeepAllVersionsNewerThanDays = null;
+ }
+
+ if (int.TryParse(element.Attribute("keepLatestVersionPerDayForDays")?.Value, out var keepLatest))
+ {
+ withCleanup.HistoryCleanup.KeepLatestVersionPerDayForDays = keepLatest;
+ }
+ else
+ {
+ withCleanup.HistoryCleanup.KeepLatestVersionPerDayForDays = null;
+ }
+ }
+
private void UpdateContentTypesAllowedTemplates(IContentType contentType, XElement allowedTemplatesElement, XElement defaultTemplateElement)
{
if (allowedTemplatesElement != null && allowedTemplatesElement.Elements("Template").Any())
diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeRepository.cs
index 6ab97c971f..9b0fe45c79 100644
--- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeRepository.cs
+++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeRepository.cs
@@ -297,15 +297,17 @@ namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement
private void PersistHistoryCleanup(IContentType entity)
{
+ // historyCleanup property is not mandatory for api endpoint, handle the case where it's not present.
+ // DocumentTypeSave doesn't handle this for us like ContentType constructors do.
if (entity is IContentTypeWithHistoryCleanup entityWithHistoryCleanup)
{
ContentVersionCleanupPolicyDto dto = new ContentVersionCleanupPolicyDto()
{
ContentTypeId = entity.Id,
Updated = DateTime.Now,
- PreventCleanup = entityWithHistoryCleanup.HistoryCleanup.PreventCleanup,
- KeepAllVersionsNewerThanDays = entityWithHistoryCleanup.HistoryCleanup.KeepAllVersionsNewerThanDays,
- KeepLatestVersionPerDayForDays = entityWithHistoryCleanup.HistoryCleanup.KeepLatestVersionPerDayForDays
+ PreventCleanup = entityWithHistoryCleanup.HistoryCleanup?.PreventCleanup ?? false,
+ KeepAllVersionsNewerThanDays = entityWithHistoryCleanup.HistoryCleanup?.KeepAllVersionsNewerThanDays,
+ KeepLatestVersionPerDayForDays = entityWithHistoryCleanup.HistoryCleanup?.KeepLatestVersionPerDayForDays
};
Database.InsertOrUpdate(dto);
}
diff --git a/src/Umbraco.Infrastructure/Services/Implement/EntityXmlSerializer.cs b/src/Umbraco.Infrastructure/Services/Implement/EntityXmlSerializer.cs
index d2ebb72bca..26060bf988 100644
--- a/src/Umbraco.Infrastructure/Services/Implement/EntityXmlSerializer.cs
+++ b/src/Umbraco.Infrastructure/Services/Implement/EntityXmlSerializer.cs
@@ -5,6 +5,7 @@ using System.Linq;
using System.Net;
using System.Xml.Linq;
using Umbraco.Cms.Core.Models;
+using Umbraco.Cms.Core.Models.ContentEditing;
using Umbraco.Cms.Core.PropertyEditors;
using Umbraco.Cms.Core.Serialization;
using Umbraco.Cms.Core.Strings;
@@ -494,6 +495,11 @@ namespace Umbraco.Cms.Core.Services.Implement
genericProperties,
tabs);
+ if (contentType is IContentTypeWithHistoryCleanup withCleanup && withCleanup.HistoryCleanup is not null)
+ {
+ xml.Add(SerializeCleanupPolicy(withCleanup.HistoryCleanup));
+ }
+
var folderNames = string.Empty;
var folderKeys = string.Empty;
//don't add folders if this is a child doc type
@@ -564,6 +570,29 @@ namespace Umbraco.Cms.Core.Services.Implement
propertyType.ValidationRegExpMessage != null ? new XElement("ValidationRegExpMessage", propertyType.ValidationRegExpMessage) : null,
propertyType.Description != null ? new XElement("Description", new XCData(propertyType.Description)) : null);
+ private XElement SerializeCleanupPolicy(HistoryCleanup cleanupPolicy)
+ {
+ if (cleanupPolicy == null)
+ {
+ throw new ArgumentNullException(nameof(cleanupPolicy));
+ }
+
+ var element = new XElement("HistoryCleanupPolicy",
+ new XAttribute("preventCleanup", cleanupPolicy.PreventCleanup));
+
+ if (cleanupPolicy.KeepAllVersionsNewerThanDays.HasValue)
+ {
+ element.Add(new XAttribute("keepAllVersionsNewerThanDays", cleanupPolicy.KeepAllVersionsNewerThanDays));
+ }
+
+ if (cleanupPolicy.KeepLatestVersionPerDayForDays.HasValue)
+ {
+ element.Add(new XAttribute("keepLatestVersionPerDayForDays", cleanupPolicy.KeepLatestVersionPerDayForDays));
+ }
+
+ return element;
+ }
+
// exports an IContentBase (IContent, IMedia or IMember) as an XElement.
private XElement SerializeContentBase(IContentBase contentBase, string urlValue, string nodeName, bool published)
{
diff --git a/src/Umbraco.Web.UI.Client/src/views/documentTypes/views/permissions/permissions.html b/src/Umbraco.Web.UI.Client/src/views/documentTypes/views/permissions/permissions.html
index fdbca299b2..84187bfe57 100644
--- a/src/Umbraco.Web.UI.Client/src/views/documentTypes/views/permissions/permissions.html
+++ b/src/Umbraco.Web.UI.Client/src/views/documentTypes/views/permissions/permissions.html
@@ -101,23 +101,19 @@
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml
index 6922fe803d..f5ff8b3404 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml
@@ -1833,11 +1833,11 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
using this editor will get updated with the new settings.
History cleanup
- Allow override the global settings for when history versions are removed.
+ Allow overriding the global history cleanup settings.
Keep all versions newer than days
Keep latest version per day for days
Prevent cleanup
- NOTE! The content version cleanup feature is disabled globally. These settings will not take effect until it is enabled.
+ History cleanup is disabled globally, these settings will not take effect until it is enabled.
Add language
diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml
index 4000682ed9..f145b60d50 100644
--- a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml
+++ b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml
@@ -1897,11 +1897,11 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
using this editor will get updated with the new settings.
History cleanup
- Allow override the global settings for when history versions are removed.
+ Allow overriding the global history cleanup settings.
Keep all versions newer than days
Keep latest version per day for days
Prevent cleanup
- NOTE! The content version cleanup feature is disabled globally. These settings will not take effect until it is enabled.
+ History cleanup is disabled globally, these settings will not take effect until it is enabled.
Add language
diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Packaging/PackageDataInstallationTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Packaging/PackageDataInstallationTests.cs
index 39ca764f94..ef6585bef6 100644
--- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Packaging/PackageDataInstallationTests.cs
+++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Packaging/PackageDataInstallationTests.cs
@@ -766,6 +766,77 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Packaging
Assert.That(testContentType.ContentTypeCompositionExists("Seo"), Is.True);
}
+ [Test]
+ public void ImportDocumentType_NewTypeWithOmittedHistoryCleanupPolicy_InsertsDefaultPolicy()
+ {
+ // Arrange
+ var withoutCleanupPolicy = XElement.Parse(ImportResources.SingleDocType);
+
+ // Act
+ var contentTypes = PackageDataInstallation
+ .ImportDocumentType(withoutCleanupPolicy, 0)
+ .OfType();
+
+ // Assert
+ Assert.Multiple(() =>
+ {
+ Assert.NotNull(contentTypes.Single().HistoryCleanup);
+ Assert.IsFalse(contentTypes.Single().HistoryCleanup.PreventCleanup);
+ });
+ }
+
+ [Test]
+ public void ImportDocumentType_WithHistoryCleanupPolicyElement_ImportsWithCorrectValues()
+ {
+ // Arrange
+ var docTypeElement = XElement.Parse(ImportResources.SingleDocType_WithCleanupPolicy);
+
+ // Act
+ var contentTypes = PackageDataInstallation
+ .ImportDocumentType(docTypeElement, 0)
+ .OfType();
+
+ // Assert
+ Assert.Multiple(() =>
+ {
+ Assert.NotNull(contentTypes.Single().HistoryCleanup);
+ Assert.IsTrue(contentTypes.Single().HistoryCleanup.PreventCleanup);
+ Assert.AreEqual(1, contentTypes.Single().HistoryCleanup.KeepAllVersionsNewerThanDays);
+ Assert.AreEqual(2, contentTypes.Single().HistoryCleanup.KeepLatestVersionPerDayForDays);
+ });
+ }
+
+ [Test]
+ public void ImportDocumentType_ExistingTypeWithOmittedHistoryCleanupPolicy_DoesNotOverwriteDatabaseContent()
+ {
+ // Arrange
+ var withoutCleanupPolicy = XElement.Parse(ImportResources.SingleDocType);
+ var withCleanupPolicy = XElement.Parse(ImportResources.SingleDocType_WithCleanupPolicy);
+
+ // Act
+ var contentTypes = PackageDataInstallation
+ .ImportDocumentType(withCleanupPolicy, 0)
+ .OfType();
+
+ var contentTypesUpdated = PackageDataInstallation
+ .ImportDocumentType(withoutCleanupPolicy, 0)
+ .OfType();
+
+ // Assert
+ Assert.Multiple(() =>
+ {
+ Assert.NotNull(contentTypes.Single().HistoryCleanup);
+ Assert.IsTrue(contentTypes.Single().HistoryCleanup.PreventCleanup);
+ Assert.AreEqual(1, contentTypes.Single().HistoryCleanup.KeepAllVersionsNewerThanDays);
+ Assert.AreEqual(2, contentTypes.Single().HistoryCleanup.KeepLatestVersionPerDayForDays);
+
+ Assert.NotNull(contentTypesUpdated.Single().HistoryCleanup);
+ Assert.IsTrue(contentTypesUpdated.Single().HistoryCleanup.PreventCleanup);
+ Assert.AreEqual(1, contentTypes.Single().HistoryCleanup.KeepAllVersionsNewerThanDays);
+ Assert.AreEqual(2, contentTypes.Single().HistoryCleanup.KeepLatestVersionPerDayForDays);
+ });
+ }
+
private void AddLanguages()
{
var globalSettings = new GlobalSettings();
diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/EntityXmlSerializerTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/EntityXmlSerializerTests.cs
index 514b600e48..e58b02cff0 100644
--- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/EntityXmlSerializerTests.cs
+++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/EntityXmlSerializerTests.cs
@@ -25,6 +25,7 @@ using Umbraco.Cms.Core.PropertyEditors;
using Microsoft.Extensions.Options;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Core.Media;
+using Umbraco.Cms.Core.Models.ContentEditing;
using Umbraco.Cms.Core.Strings;
namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services
@@ -225,6 +226,58 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services
Assert.AreEqual(media.Properties[Constants.Conventions.Media.Bytes].GetValue().ToString(), element.Elements(Constants.Conventions.Media.Bytes).Single().Value);
Assert.AreEqual(media.Properties[Constants.Conventions.Media.Extension].GetValue().ToString(), element.Elements(Constants.Conventions.Media.Extension).Single().Value);
}
+
+ [Test]
+ public void Serialize_ForContentTypeWithHistoryCleanupPolicy_OutputsSerializedHistoryCleanupPolicy()
+ {
+ // Arrange
+ var template = TemplateBuilder.CreateTextPageTemplate();
+ FileService.SaveTemplate(template); // else, FK violation on contentType!
+
+ var contentType = ContentTypeBuilder.CreateTextPageContentType(defaultTemplateId: template.Id);
+
+ contentType.HistoryCleanup = new HistoryCleanup
+ {
+ PreventCleanup = true,
+ KeepAllVersionsNewerThanDays = 1,
+ KeepLatestVersionPerDayForDays = 2
+ };
+
+ ContentTypeService.Save(contentType);
+
+ // Act
+ var element = Serializer.Serialize(contentType);
+
+ // Assert
+ Assert.Multiple(() =>
+ {
+ Assert.That(element.Element("HistoryCleanupPolicy")!.Attribute("preventCleanup")!.Value, Is.EqualTo("true"));
+ Assert.That(element.Element("HistoryCleanupPolicy")!.Attribute("keepAllVersionsNewerThanDays")!.Value, Is.EqualTo("1"));
+ Assert.That(element.Element("HistoryCleanupPolicy")!.Attribute("keepLatestVersionPerDayForDays")!.Value, Is.EqualTo("2"));
+ });
+ }
+
+ [Test]
+ public void Serialize_ForContentTypeWithNullHistoryCleanupPolicy_DoesNotOutputSerializedDefaultPolicy()
+ {
+ // Arrange
+ var template = TemplateBuilder.CreateTextPageTemplate();
+ FileService.SaveTemplate(template); // else, FK violation on contentType!
+
+ var contentType = ContentTypeBuilder.CreateTextPageContentType(defaultTemplateId: template.Id);
+
+ contentType.HistoryCleanup = null;
+
+ ContentTypeService.Save(contentType);
+
+ var element = Serializer.Serialize(contentType);
+
+ // Assert
+ Assert.Multiple(() =>
+ {
+ Assert.That(element.Element("HistoryCleanupPolicy"), Is.Null);
+ });
+ }
private void CreateDictionaryData()
{
diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/ImportResources.Designer.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/ImportResources.Designer.cs
index b49d02d159..96deac66bd 100644
--- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/ImportResources.Designer.cs
+++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/ImportResources.Designer.cs
@@ -72,7 +72,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services.Importin
/// </info>
/// <Documents>
/// <DocumentSet importMode="root">
- /// <NewType id="1148" parentID="-1" level="1" creatorID="0" sortOrder="9" createDate="2013-07-23T12:06:07" updateDate="2013-07-23T15:56:37" nodeName="DoIt" urlName="doit" path="-1,1148" isDoc="" nodeType="1134" creatorName="admin" writerName="admin" writerID="0" template="1133" nodeTy [rest of string was truncated]";.
+ /// <NewType key="9c9b55d0-2fbf-4f12-afea-023bd7b2519d" id="1148" parentID="-1" level="1" creatorID="0" sortOrder="9" createDate="2013-07-23T12:06:07" updateDate="2013-07-23T15:56:37" nodeName="DoIt" urlName="doit" path="-1,1148" isDoc="" nodeType="1134" creatorName="admin" writerName= [rest of string was truncated]";.
///
internal static string CheckboxList_Content_Package {
get {
@@ -91,7 +91,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services.Importin
/// </info>
/// <Documents>
/// <DocumentSet importMode="root">
- /// <umbHomePage id="1068" parentID="-1" level="1" creatorID="0" sortOrder="0" createDate="2014-11-26T12:52:35" updateDate="2014-11-26T12:52:36" nodeName="Home" urlName="home" path="-1,1068" isDoc="" nodeType="1056" creatorName="Morten Christensen" writerName="Morten Christensen" [rest of string was truncated]";.
+ /// <umbHomePage key="9c9b55d0-2fbf-4f12-afea-023bd7b2519d" id="1068" parentID="-1" level="1" creatorID="0" sortOrder="0" createDate="2014-11-26T12:52:35" updateDate="2014-11-26T12:52:36" nodeName="Home" urlName="home" path="-1,1068" isDoc="" nodeType="1056" creatorName="Morten Ch [rest of string was truncated]";.
///
internal static string CompositionsTestPackage {
get {
@@ -124,15 +124,14 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services.Importin
/// <files />
/// <info>
/// <package>
- /// <name>Dictionary-Package</name>
+ /// <name>Dictionary-Package</name>
/// </package>
/// </info>
/// <DictionaryItems>
- /// <DictionaryItem Key="Parent">
+ /// <DictionaryItem Key="28f2e02a-8c66-4fcd-85e3-8524d551c0d3" Name="Parent">
/// <Value LanguageId="2" LanguageCultureAlias="nb-NO"><![CDATA[ForelderVerdi]]></Value>
/// <Value LanguageId="3" LanguageCultureAlias="en-GB"><![CDATA[ParentValue]]></Value>
- /// <DictionaryItem Key="Child">
- /// <Value LanguageId="2" LanguageCultureAlias="nb-NO"><![CDATA[BarnV [rest of string was truncated]";.
+ /// <DictionaryItem Key="e7dba0a9-d517-4ba4-8e18-2764d392c611" Name=" [rest of string was truncated]";.
///
internal static string Dictionary_Package {
get {
@@ -239,6 +238,33 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services.Importin
}
}
+ ///
+ /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8" ?>
+ ///<DocumentType>
+ /// <Info>
+ /// <Name>test</Name>
+ /// <Key>150ead17-d359-42a2-ac33-6504cc52ced1</Key>
+ /// <Alias>test</Alias>
+ /// <Icon>folder.gif</Icon>
+ /// <Thumbnail>folder.png</Thumbnail>
+ /// <Description>
+ /// </Description>
+ /// <AllowAtRoot>False</AllowAtRoot>
+ /// <AllowedTemplates>
+ /// <Template>test</Template>
+ /// </AllowedTemplates>
+ /// <DefaultTemplate>test</DefaultTemplate>
+ /// </Info>
+ /// <Structure>
+ /// <DocumentType>test</DocumentType>
+ /// </Str [rest of string was truncated]";.
+ ///
+ internal static string SingleDocType_WithCleanupPolicy {
+ get {
+ return ResourceManager.GetString("SingleDocType_WithCleanupPolicy", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to <?xml version="1.0" encoding="UTF-8" standalone="no"?>
///<umbPackage>
@@ -249,8 +275,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services.Importin
/// </info>
/// <Documents>
/// <DocumentSet importMode="root">
- /// <Homepage id="1072" parentID="-1" level="1" creatorID="0" sortOrder="0" createDate="2013-02-17T09:04:39" updateDate="2013-02-17T09:10:47" nodeName="Home" urlName="home" path="-1,1072" isDoc="" nodeType="1062" creatorName="admin" writerName="admin" writerID="0" template="1049">
- /// <slide [rest of string was truncated]";.
+ /// <Homepage key="9c9b55d0-2fbf-4f12-afea-023bd7b2519d" id="1072" parentID="-1" level="1" creatorID="0" sortOrder="0" createDate="2013-02-17T09:04:39" updateDate="2013-02-17T09:10:47" nodeName="Home" urlName="home" path="-1,1072" isDoc="" nodeType="1062" creatorName="admin" writerName="admin" wr [rest of string was truncated]";.
///
internal static string StandardMvc_Package {
get {
diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/ImportResources.resx b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/ImportResources.resx
index e8029b6520..df274b3e44 100644
--- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/ImportResources.resx
+++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/ImportResources.resx
@@ -1,17 +1,17 @@
-
+
-
@@ -157,4 +157,7 @@
MediaTypesAndMedia-Package.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8
+
+ SingleDocType-WithCleanupPolicy.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252
+
diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/SingleDocType-WithCleanupPolicy.xml b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/SingleDocType-WithCleanupPolicy.xml
new file mode 100644
index 0000000000..f3836e3f9c
--- /dev/null
+++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/SingleDocType-WithCleanupPolicy.xml
@@ -0,0 +1,36 @@
+
+
+
+ test
+ 150ead17-d359-42a2-ac33-6504cc52ced1
+ test
+ folder.gif
+ folder.png
+
+
+ False
+
+ test
+
+ test
+
+
+ test
+
+
+
+ test
+ test
+ b4471851-82b6-4c75-afa4-39fa9c6a75e9
+ fbaf13a8-4036-41f2-93a3-974f678c312a
+
+
+ False
+
+
+
+
+
+
+
+