salesagility / SuiteCRM-Core

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

Modules no longer state the created by or modified by #506

Open azzy9 opened 4 months ago

azzy9 commented 4 months ago

Issue

When looking in a module record, the created and modified fields use to state the time and who they where created and modified by. Now they just state the time. I have ensured the custom code in the metadata is {$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value} but it doesn't make a difference. This is also seen on the demo site.

Possible Fix

No response

Steps to Reproduce the Issue

1. Look in a module record e.g. an account or a task
2. There is not a "created by user" or "modified by user"

Context

Cannot see who created or modified records.

Version

8.6.0

What browser are you currently using?

Chrome

Browser Version

Chromium: 126.0.6478.126 (Official Build) (64-bit)

Environment Information

PHP 8.1

Operating System and Version

Ubuntu 22.04

azzy9 commented 4 months ago

Had a look around and found the customCode in the array is only used to force it to be readonly here: https://github.com/salesagility/SuiteCRM-Core/blob/f483bec4cffb267840725af5c022a7e8f2599934/core/backend/ViewDefinitions/LegacyHandler/RecordView/RecordViewReadOnlyMapper.php#L113

Other than that is pretty much ignored in suitecrm 8, the solution is to add the fields via studio then modify the metadata to add a blank customCode item in the array to make it read only.

It will be tedious to add it to all the modules, so I don't know if this will still be considered a bug or a feature request.

azzy9 commented 4 months ago

Another update, The notes module does have modified and created by names in the field by default, this can also be seen in the demo. Not sure why since the metadata is the same as the other modules, so I will say it is a bug. (I knew I saw it with the names somewhere)

Edit: the Notes module seems to be using the old system for some reason, maybe something still needs to be ported for it

chris001 commented 4 months ago

You can check if a module is using the "legacy" Suite 7 page display system, by checking this file module_routing.yaml: https://github.com/salesagility/SuiteCRM-Core/blob/hotfix/config/services/module/module_routing.yaml