Skip to content

Fix alert bug when inviting member

路志远请求将fix-team-alert-when-invite合并到main-jh

What does this MR do and why?

背景

在团队版的测试中,发现了邀请成员时出现的弹窗 Bug:https://jihulab.com/gitlab-cn/gitlab/-/issues/4306#note_4960774 :当 Seats 数额已满,再次邀请新成员会弹窗(如下图)提示可以继续邀请,继续点击又会报错说不允许再次邀请了,二者矛盾。

image

问题原因是:在打开 FF :block_seat_overages? 后,「如果新成员会导致 Seats 超额,就显示此弹窗」这个老逻辑没有被去掉。这是一个 Upstream Bug,但考虑到研发效率,我们在 Jihu 这边通过此 MR 先修复它。

代码原理

  • will_increase_overage 字段表示邀请动作是否会导致 Seats 超额
  • 前端根据 will_increase_overage 字段判断是否显示上图的弹窗
  • 我们本次新增一层逻辑:当 Block Seats 时,will_increase_overage 总是返回 False

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

  1. 以 SaaS 方式启动 GDK,为 Group 配置付费订阅
  2. 将偏好语言调整为英文(中文会触发另一个 Bug)
  3. 开启 FF block_seat_overages
  4. 在 Group 邀请成员直到超过 Seats 限制数额
  5. 在合并本 MR 之前,就会看到上述弹窗出现
路志远 编辑于

合并请求报告

加载中