Skip to content

Moved item can end up deleted on sync #435

@Joentje71

Description

@Joentje71

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

What is the current behavior?
When an item, for instance a template item, is moved between different projects, it can end up deleted on the first sync run. Depending on the Helix layers between which it is moved, it can go wrong. If it is moved from the project layer to a feature, it ends up deleted. But it might be our team that has the unicorn configuration wrong.

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

  1. existing item under Project.Website (Helix project layer)
  2. move it to Feature.Something project
  3. do a unicorn sync and notice the order in which the projects are synced:
    • first, the feature is synced: the item is [U] by unicorn (I think the update includes the path, among other fields)
    • after that, the Project.Website is synced: the item is [D] by unicorn, "because it did not exist in the serialization provider"

What is the expected behavior?
We would like the item not to be deleted, because it still exists, only in a different project.
I think dependencies cannot solve this easily, because it is not the dependency that creates the problem.
After all, at the same time another item could be moved the other way, from feature to project layer.
Somehow, unicorn should be aware of adds/deletes across different projects

Please mention your Sitecore version and Unicorn version.
Sitecore 10.2.0 and 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