YetiForceCompany / YetiForceCRM

Our team created for you one of the most innovative CRM systems that supports mainly business processes and allows for customization according to your needs. Be ahead of your competition and implement YetiForce!
https://yetiforce.com
Other
1.72k stars 742 forks source link

[bug][5.2.42][Default mandatory field] Does not work like a text type field #11880

Closed MacarenaReina closed 4 years ago

MacarenaReina commented 4 years ago

🐞 bug report

⁉️ Describe the bug

I create a new module (when you create a new module it creates a mandatory text field too). When I edit the default field of a record from 0.4 to 0.40 it does not detect changes so it does not save the new value (0.40).

πŸ”₯ How to trigger the error

Steps to reproduce the behavior: 2019-10-29_11-11-34

I think the problem is there because $this->getPreviousValue() is empty: https://github.com/YetiForceCompany/YetiForceCRM/blob/acc6528abd051703737e0fc94e071058975f9916/modules/Vtiger/models/Record.php#L462

πŸ‘Ž Actual Behavior

Does not save the new value

πŸ‘ Expected Behavior

Save the new value because in my case we need to write on this field text or numbers but in the case of numbers it can be with zeros at the end.

πŸ‘· Testing

πŸ“· Screenshot of configuration

πŸ“ PHP/Apache/Nginx/Browser/CRM Logs

🌍 Your Environment

Environment Version / Name
YetiForce
Web server (name and version)
PHP
Browser (name and version) Google chrome
Operating System (name and version) Windows 10
Database (name and version)
Service Pack version

❓ Additional context

Add any other context about the problem here.

❗️ Inform the community if you solve the problem

bpabiszczak commented 4 years ago

image

Works on gitdeveloper.

MacarenaReina commented 4 years ago

I have just test it on gitdeveloper and it does not work. If you reload the view disappear the last zero.

2020-02-19_08-46-04

I think it's a problem with the use of trim in some function, because it removes final zeros too.