支持企微通讯录缺失手机号(07-26-internal-ops-recovery-baseline)
这个提交包含在:
@@ -67,6 +67,38 @@ describe("wecom HR master sync helpers", () => {
|
||||
expect(profile.missingRequiredFields).toContain("email");
|
||||
});
|
||||
|
||||
it("accepts a profile with no phone and does not plan clearing an existing phone", () => {
|
||||
const profile = normalizeWecomHrProfile({
|
||||
contact: {
|
||||
userid: "missing-phone",
|
||||
name: "缺手机号成员",
|
||||
biz_mail: "[email protected]",
|
||||
department: [1],
|
||||
enable: 1,
|
||||
},
|
||||
staff: {},
|
||||
departmentMap: new Map([["1", { externalId: "1", name: "行政部" }]]),
|
||||
});
|
||||
|
||||
expect(profile.phone).toBe("");
|
||||
expect(profile.missingRequiredFields).toEqual([]);
|
||||
|
||||
const changes = __testables.buildEmployeeChanges(
|
||||
{
|
||||
id: "employee-1",
|
||||
name: profile.name,
|
||||
phone: "19900000009",
|
||||
email: profile.email,
|
||||
department_id: "department-1",
|
||||
title: "员工",
|
||||
wecom_identity_binding: { external_user_id: profile.externalUserId },
|
||||
},
|
||||
profile,
|
||||
{ id: "department-1", name: "行政部" },
|
||||
);
|
||||
expect(changes).not.toHaveProperty("phone");
|
||||
});
|
||||
|
||||
it("marks inactive WeCom members as confirmation-required instead of active", () => {
|
||||
const profile = normalizeWecomHrProfile({
|
||||
contact: {
|
||||
|
||||
在新工单中引用
屏蔽一个用户