commercetools / commercetools/nodejs

Discount Code Generator yields no error message even if CSV file contains duplicate values

Open
#1,597 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
77
Forks
70
PR merge metrics
No merged PRs in 30d

Description

### Support reference number

https://jira.commercetools.com/browse/SUPPORT-9609

Relevant CSV files are in ticket

### Description

When using the Discount Code Generator tool, parameters can be set such that the code generator cannot produce all unique codes and there is no error messaging to suggest there was a problem yielding the codes.

In IMPEX, if you set the quantity of discount codes to 100, the amount of characters for each generated code to 5, and set the prefix to something like "Test", the generator will produce a CSV file with 100 codes but there will be duplicates, and there is no error message to suggest that the operation wasn't possible.

### Expected Behavior

When using the discount code generator, if the parameters set make it impossible for the generator to perform its function, then an error message should be generated.

### Current Behavior

If you set parameters that make it impossible for the generator to perform its function, the generator yields the CSV with no indication that there are duplicate values.

Customer would like for there to be some indication that the process didn't actually do what it claims it did.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.