commercetools / commercetools/commercetools-sync-java

Handle product deletions and variant assignments

未关闭
#132 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
filter
主要语言
Java
星标
40
派生
41
PR 合并指标
30 天内没有已合并 PR

描述

### Description
It might happen that product is created with wrong variant assignment. Example:
`Product with key 1`: `sku 1`
`Product with key 2`: `sku 2`
`Product with key 3`: `sku 3`

At some point external data (CTP project, CSV, XML...) changes to:
`Product with key 4`: `sku 1`, `sku 2`, `sku 3`

Currently this will lead to an error that `Product 4` can not be created as sku 1, 2 and 3 are already in use in other products. Handling above scenario manually is time intensive and error prone and it gets very problematic if the change has to be distributed for example from master to multiple another CTP projects.

### Expected Behaviour
`Product 4` should be created with sku 1, 2 and 3 and all conflicting products or variants deleted.

### To clarify
- Should product 1,2 and 3 be deleted or only its variants? Consider for example that Product 1 could have also variant assigned with sku 4?
- Shall sync decide what to do in this case or rather provide callback so that the user of the library has control?
- Consider optional migration of existing data* from deleted variant product 1, sku 1 to recreated one product 4, sku 1 variant.

_Existing data_: data which might be set only once by another import process and is not available in new variant/product data. Good candidates are prices or other attributes/flags like product approval.
- Consider other use cases if above example is inverted.

贡献指南

打开贡献指南

调研方向

未指定任何文件、测试或入口点。首先跟踪产品和变体同步流程及其对 SKU 冲突的处理,然后确定删除的是产品还是仅删除变体、行为是否由回调控制,以及现有数据是否会迁移。完成的标准是:选定的行为已完成规范说明和实现,并覆盖所描述的情况及其反向情况。

由索引模型根据 Issue 内容生成。

评估

技术栈
java
领域
backend
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。