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

Option to exclude field from serialized user yml file #385

Open
zaheer-tariq opened this issue May 13, 2020 · 1 comment
Open

Option to exclude field from serialized user yml file #385

zaheer-tariq opened this issue May 13, 2020 · 1 comment

Comments

@zaheer-tariq
Copy link

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

What is the current behavior?
We are serializing users for a domain using the config below.

<userPredicate type="Unicorn.Users.UserPredicates.ConfigurationUserPredicate, Unicorn.Users" singleInstance="true">
	<include domain="test" pattern="^((?!Anonymous).)*$" />
</userPredicate>
<userSyncConfiguration removeOrphans="true" defaultPassword="123456789" minPasswordLength="1" singleInstance="true" />

We use this user to login via code and perform some automated tasks in Sitecore. The user's created field value e.g. "Created: "2020-05-11T11:17:55.0000000Z" in the yml file keeps changing each time we sync and this appears as a change on Git. This sometimes also results in merge conflicts. We would like to avoid this by either ignoring this field via something similar to fieldFilter. Or ignore future changes to the yml file (this specific one only) but still keeping the file on Git as we will need that user in Sitecore when we rollout changes to other machines/environments.

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

What is the expected behavior?
There should be a possibility to serialize a user only once or exclude a given field from serialized users yml file.

Please mention your Sitecore version and Unicorn version.
Sitecore: 9.0.2
Unicorn: 4.0.8

@markgibbons25
Copy link

I don't know if it would work but have you tried to exclude that field specifically?
http://www.flux-digital.com/blog/excluding-specific-fields-unicorn-serialisation-field-filter/

Also I'd recommend updating to the latest unicorn as that version has known issues.

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

No branches or pull requests

2 participants