1b.app
Link copied -

The system does not record in the history of the change of the product, even if it was added in front 0 or it was removed in the field article

Axis of history change by product https://baza.cn.ua/admin/shop/products/64906/history/?userid=&filter2_key=va...
According to the product, we changed the fields of the article
Article on the back "785641001" added "0" axis so "0785641001"
In history, the system did not record which
If you added "0785641001+" to the article, the history was saved
I ask you to correct the pardon, otherwise describe why the system behaves this way
Original question is available on version: ru

Answers:

when recording the history of changes, a non-strict comparison of the old and new values is used
https://www.php.net/manual/ru/language.operators.comparison.php - actually when comparing "785641001" = "0785641001" since it considers both strings to be equivalent numbers
19.11.2021, 16:18
Original comment available on version: ru

Куприян Владислав Валерьевич
Baza.cn.ua / Integrator (FOP Kupriyan)

Tyndyk Maxim Vadimovich
OneBox production wrote:
when recording the history of changes, a non-strict comparison of the old and new values is used
https://www.php.net/manual/ru/language.operators.comparison.php - actually when comparing "785641001" = "0785641001" since it considers both strings to be equivalent numbers

You have a pardon in the code, in the "Comparison of types", and you need to match not "number" with "string", but you need to match "term" with "string" and the same values will not be equal, correct the pardon or write what you give article to numeric type, i.e. "string"
19.11.2021, 16:58
Original comment available on version: ru


You have a pardon in the code, in the "Comparison of types", and you need to match not "number" with "string", but you need to match "term" with "string" and the same values will not be equal, correct the pardon or write what you give article to numeric type, i.e. "string"

Once again - not a strict comparison is used - in this case, the language given 2 values are equivalent as numbers. This is done on purpose so as not to litter the history of comparisons like "0 = 0.00", "1.1 = 1.10", etc.
If this does not suit you - no problem, we can finalize the setting for you so that you have a strict comparison - it will take 3 hours (products / processes / contacts). Responsibility for the "garbage" in the story (according to the example above) remains with you.
PS: if you claim about an error that something should work differently, justify it with some technical documentation (at least a technical task for the development of functionality). Otherwise, your "logic" is nothing more than your need.
22.11.2021, 12:30
Original comment available on version: ru

Куприян Владислав Валерьевич
Baza.cn.ua / Integrator (FOP Kupriyan)
Can you explain why you use logic for numeric fields in string fields and why you don't use logic in filters?
It’s like it’s just illogical to go out, the article is “string” not “number”, for which reason it’s unreasonable to win here for numerical fields
24.11.2021, 12:04
Original comment available on version: ru


Can you explain why you use logic for numeric fields in string fields and why you don't use logic in filters?

I have already indicated how the functionality works.

It’s like it’s just illogical to go out, the article is “string” not “number”, for which reason it’s unreasonable to win here for numerical fields

Logic is an abstract concept, which in most cases is based only on the perception of a particular individual of a particular situation.
Above, I offered you a solution, pointing out the possible consequences - you have the right to go through its implementation or not.
PS: you have a boxed version of the product (according to the AS IS model) - and what you think is "not logical" does not mean that it does not work correctly or should work differently.
24.11.2021, 15:35
Original comment available on version: ru

Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter. Log in and comment