When the DNI required settings is turned on, existing used addresses with no DNI cannot be updated.
When I update the missing DNI field of an address used in an order, I expect the used address to be updated silently (with the deleted flag set to 1) and I expect a new address to be created.
Steps to reproduce the behavior:
A PR fix is available #18697
@PrestaShop/prestashop-product-team I think we should have a look at the expected behaviors to make sure we don't miss something. A PR is available, the sooner, the better.
ping @LouiseBonnard (you commented the PR ;))
The annoying thing with this issue is that there is no workaround for shop administrators.
I did not test it, but there is maybe a similar bug when setting up required fields from the bottom of the addresses admin section. Should I create another issue or extend the scope of the issue and PR?
And the other issue is that the expected behavior regarding address formats does not seem to be specified on our end... does it only concern the DNI field or any other field lately set as required? We must investigate before making any decision, I'll try to do it by the end of the week. :-)
I would add another problem, this behaviour happens also for the supplier address, if you set the DNI mandatory (and the supplier address doesn't have DNI) you'll receive an error when save it 馃槉
I think it's linked.
(the affected version are also the 1.7.6 and before)
Another nice inconsistency, aha, thanks for the feedback, @marsaldev! It seems to happen only for the DNI field... alright, let's change that!
Guys, are we sure it's not a regression of the 1.7.7 ?
To be more specific about the supplier, in the form (new or edit) you'll see also the DNI field and you need to write something 馃槉
Even more, if there is a module that makes check on that field you must insert a valid DNI XD
Hi all, the great @marionf has managed to reproduce this bug, see screenshot in the issue description. It is a regression, introduced by the 1.7.7. @shaffe-fr, would you mind rebasing your pull request on the 1.7.7.x branch?
Regarding the required fields you can set at the end of the Customers > Addresses page, if you experienced the same bug, please open a new issue so that it can be qualified by the teams. ;-)
@marsaldev, we could not reproduce the same bug for suppliers, we guess it has been solved by #17305.
Hi @LouiseBonnard, the PR is updated.
About the required fields set in the database, I'll check if there is an issue and I'll create a new issue and PR.
Fixed by #18697 (@shaffe-fr)
Hi,
I just upgraded a PrestaShop from 1.7.5 to 1.7.6.5 and I was able to reproduce the bug on that branch.
@Progi1984, maybe the PR should be cherry-picked on the 1.7.6 branch?