Skip to content

[5.x]: Duplicated Short number / Reference on couple of orders #4050

@ragnarfrosti

Description

@ragnarfrosti

What happened?

We have a client that has ~400.000 completed orders.

The order reference is the default one {{number[:7]}}, so the same as Short number.

We have had 2 issues the last couple of weeks where two orders have had the same Short number (and therefore the same reference).

Image

We can adjust the reference to include more characters but since that is generated after the order is completed the Shortnumber is used in some scenarios (sent to the payment gateway etc).

Is it possible that you can add a validation when generating a new order number to verify that the shortnumber does not already exist in the system?

Craft CMS version

5.7.7

Craft Commerce version

5.3.13

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions