There is an option "Number of uses per coupon" at coupon generation form.
If I select "Unlimited" it always generated coupons with the limit for 1 usage.

How to reproduce:

  1. Open the generation form
  2. Select the unlimited option
  3. Click the generate button
  4. Check the results

There is the hack right now, how to generate unlimited coupons:

  1. Open the generation form
  2. Enter the "0" into textfield for limit number
  3. Select the unlimited option
  4. Click the generate button
  5. Check the results ;)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kala4ek created an issue. See original summary.

kala4ek’s picture

Status: Active » Needs review
FileSize
676 bytes

Here is a simple patch, that fixes that.

mglaman’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

We definitely need tests, then

czigor’s picture

bojanz’s picture

Status: Needs review » Needs work

Previously the test confirmed that it was possible to limit usage.
Now the test confirms only that it is possible to not limit usage.
We need both.

  • bojanz committed b3f0a17 on 8.x-2.x
    Issue #2981460 by czigor, kala4ek, bojanz: "Unlimited" generation option...
bojanz’s picture

Status: Needs work » Fixed
Issue tags: -Needs tests

Rewrote the test and committed. Thanks, everyone.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.