1

I have been working on an upgrade project from Sitecore 8.2 to Sitecore 10. The project is almost complete and we fetched the delta content in the form of item IDs, that have been created or updated since we took a copy of the database.

Is it possible to create a bulk package to move all of these changes in one go? Are there any other ways to move these changes quickly and efficiently?

Thanks in Advance!

2 Answers 2

0

Using the Package Designer, you could consider dynamic item packages as a solution or as the start of a solution. In my experience, this works quite efficiently; much more so than static item packages.

dynamic item package

dynamic item package filters

Some of the filter options are:

  • Item name
  • Creation date
  • Modification date
  • Publish date
  • Templates
  • Created / updated by roles / users
  • Languages

If you save the filters, a package.xml file will be added to your \App_Data\packages directory, at which point you can inspect / modify the XML.

The XML output is as follows:

<project>
  <Metadata>
    <metadata>
      <PackageName />
      <Author />
      <Version />
      <Revision />
      <License />
      <Comment />
      <Attributes />
      <Readme />
      <Publisher />
      <PostStep />
      <PackageID />
    </metadata>
  </Metadata>
  <SaveProject>True</SaveProject>
  <Sources>
    <items>
      <Database>master</Database>
      <Root>{11111111-1111-1111-1111-111111111111}</Root>
      <SkipVersions>False</SkipVersions>
      <Converter>
        <ItemToEntryConverter>
          <Transforms>
            <InstallerConfigurationTransform>
              <Options>
                <BehaviourOptions>
                  <ItemMode>Undefined</ItemMode>
                  <ItemMergeMode>Undefined</ItemMergeMode>
                </BehaviourOptions>
              </Options>
            </InstallerConfigurationTransform>
          </Transforms>
        </ItemToEntryConverter>
      </Converter>
      <Include>
        <ItemNameFilter>
          <Pattern />
          <FilterSearchType>Simple</FilterSearchType>
        </ItemNameFilter>
        <ItemDateFilter>
          <FilterType>CreatedFilter</FilterType>
          <NotOlderThan>3</NotOlderThan>
          <ActionDateTo />
          <ActionDateFrom />
        </ItemDateFilter>
        <ItemDateFilter>
          <FilterType>ModifiedFilter</FilterType>
          <NotOlderThan>3</NotOlderThan>
          <ActionDateTo />
          <ActionDateFrom />
        </ItemDateFilter>
        <ItemPublishFilter>
          <PublishDate />
          <CheckWorkflow>True</CheckWorkflow>
        </ItemPublishFilter>
        <ItemTemplateFilter>
          <Templates />
        </ItemTemplateFilter>
        <ItemUserFilter>
          <FilterType>Created</FilterType>
          <Accounts />
        </ItemUserFilter>
        <ItemUserFilter>
          <FilterType>Modified</FilterType>
          <Accounts />
        </ItemUserFilter>
        <ItemLanguageFilter>
          <Languages />
        </ItemLanguageFilter>
      </Include>
      <Exclude />
      <Name />
    </items>
  </Sources>
  <Converter>
    <TrivialConverter>
      <Transforms />
    </TrivialConverter>
  </Converter>
  <Include />
  <Exclude />
  <Name />
</project>

Although there is no obvious way to filter by specific item IDs that I have been able to find, that doesn't mean that it can't be done. It may also be possible to do some customization to add support for such functionality.

0

You can achieve this with the help of PowerShell script -

This PowerShell script creates a Sitecore package by adding items to it based on an array of item IDs, and then exports the package as a ZIP file and offers it for download.

$itemIdArray = @("itemId", "itemId", "itemId") #Add Item Id's in this Array

$package = New-Package "Delta Package";

# Set package metadata
$package.Sources.Clear();

$package.Metadata.Author = "Admin";
$package.Metadata.Publisher = "Admin";
$package.Metadata.Version = "1.0";

# Add items to the package

foreach ($itemId in $itemIdArray) {     

$source = Get-Item -Path "master:" -ID $itemId | New-ItemSource -Name 'N/A' -InstallMode Overwrite
$package.Sources.Add($source);

}

# Save package
Export-Package -Project $package -Path "$($package.Name)-$($package.Metadata.Version).zip" -Zip

# Offer the user to download the package
Download-File "$SitecorePackageFolder\$($package.Name)-$($package.Metadata.Version).zip"

Hope this helps!

Not the answer you're looking for? Browse other questions tagged or ask your own question.