zulip / zulip

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
https://zulip.com
Apache License 2.0
21.25k stars 7.68k forks source link

custom_profile_fields: Delete modal will not appear in select field for edge case #29879

Open shubham-padia opened 4 months ago

shubham-padia commented 4 months ago

Bug 1:

The above happens because data-value is changed by read_select_field_data_from_form when we have typed example_option in the new input box because it matches with an old value. Making any changes to that input box will not change the data-value and thus no delete confirmation dialog. Previously before #29813, read_select_field_data_from_form was only called before submit, but now it is called after any field is changed.

Bug 2:

Solution:

From https://github.com/zulip/zulip/pull/29880#issuecomment-2092362778.

If an option is renamed, it's safest to remove it from users' profiles. Otherwise, there's a risk that it will look like they chose something they didn't. Previously, if a user deleted an option and then filled the same text in a new option, we assumed it was the same option behind the scenes. We will not do that anymore.

So, this bug will not be directly solved, but solved implicitly by the above change since the underlying code for the bug will cease to exist

Zulip Server and web app version:

zulipbot commented 4 months ago

Hello @zulip/server-settings members, this issue was labeled with the "area: settings (admin/org)" label, so you may want to check it out!