Skip to content

Not possible to config patch the fieldFilter exclude list #434

@jammykam

Description

@jammykam

Do you want to request a feature or report a bug?
Report a bug

What is the current behavior?
It is not possible to patch:delete any of the exclude fieldFilter entries from the Unicorn.config file because this these elements currently do not use a significant attribute .

If the current behavior is a bug, please provide the steps to reproduce.

Create a patch config file which attempts to delete the __Revision field, then check /sitecore/admin/showconfig.aspx. You will note the revision field is still present, and instead the first entry from the list (Last Run) has been deleted instead.

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
  <sitecore role:require="Standalone or ContentManagement">
    <unicorn>
      <defaults>
        <fieldFilter>
          <exclude note="'__Revision' field on Standard Template">
            <patch:delete />
          </exclude>
        </fieldFilter>
      </defaults>
    </unicorn>
  </sitecore>
</configuration>

What is the expected behavior?
The expected behaviour is that the specified element would be deleted, or patched. This will only be possible if the attributes are changed to one which is a significant attribute. I suggest changing the note attribute in this section to instead use desc.

This issue is specifically an issue when using Sitecore Publishing Service, and genarating IAR files from Unicorn. SPS requires the Revision field to be present.

Please mention your Sitecore version and Unicorn version.
Sitecore 10.2, Unicorn 4.1.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions