salesagility / SuiteCRM

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
4.27k stars 2.03k forks source link

Fix #8209 - Compare parentenum_value more precisely #10405

Closed ojs87 closed 2 months ago

ojs87 commented 2 months ago

Description

If a Mass Update is performed on a module containing dynamic fields with underscores in parent field keys, the child field's default value is always set, regardless if a change has been made to the dynamic parent field. This issue is closely related to https://github.com/salesagility/SuiteCRM/issues/8209 however the proposed fix in https://github.com/salesagility/SuiteCRM/pull/10340 does not fix this issue if a custom dynamic dropdown is still in the Cases module and this can happen with no change to the dynamic dropdowns.

examples of dynamic dropdown options that would be affected:

parent dropdown keys: 
health_and_safety

child option keys:
health_and_safety_fire
health_and_safety_power_cut
health_and_safety_volcano

Motivation and Context

Mass Update on many records can cause many unwanted changes to dynamic dropdowns

How To Test This

  1. Add a dynamic dropdown with keys containing underscores to a module
  2. Create a record and set the child value to non-default(not the first value)
  3. Perform a mass update on the record, with no changes to the dynamic dropdowns
  4. The dynamic dropdown child field will be set to the default value.

Types of changes

Final checklist