salesagility / SuiteCRM

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

Bug in TemplateHandler.php #7070

Closed cartbar closed 5 years ago

cartbar commented 5 years ago

Issue

I have been looking through the code to try to figure out how to change what is displayed in a parent field for the autocomplete and I noticed what I think is a bug in /include/TemplateHandler/TemplateHandler.php. Currently it contains:

656 } else { 657 $sqs_objects[$name]['populate_list'] = $field['field_list']; 658 $sqs_objects[$name]['field_list'] = $field['populate_list']; 659 }

I think it should be:

656 } else { 657 $sqs_objects[$name]['populate_list'] = $field['populate_list']; 658 $sqs_objects[$name]['field_list'] = $field['field_list']; 659 }

Expected Behavior

Actual Behavior

Possible Fix

Steps to Reproduce

1. 2. 3. 4.

Context

Your Environment

Version 7.10.10 Sugar Version 6.5.25 (Build 344)

Dillon-Brown commented 5 years ago

Hi @cartbar, were you able to replicate this as an actual bug? it's potentially intentional, we'd need to trigger this code to check.

cartbar commented 5 years ago

Hello.

No, as I am still trying to figure out how the code works, but looking at the source in context, it looks wrong.

Regards,

Carl

samus-aran commented 5 years ago

Hi there, this has been inside the core code base since forking from Sugar. Unless there is a bug identified then this is bad naming that isn't affecting functionality. I'm closing this bug report but anyone is more than welcome to de-tangle those references to accurately reflect the end result.

https://github.com/salesagility/SuiteCRM/blob/8e51b0e900d7e8cf39529c39ab2976583c638e69/include/TemplateHandler/TemplateHandler.php#L378