Skip to content

Uniqueness of coupon code #290

Description

@iambibhas

Right now DiscountCoupon.code are unique only inside the same DiscountPolicy. But here in this bit we assume that coupon codes are unique globally. Which caused couple of failures when we created couple of coupon codes with same name as some old coupon codes.

So there is a confusion about the uniqueness of coupon codes. Are they unique -

  1. within a discount policy
  2. across multiple discount policies but within a single item (as Item links to multiple discount policies)
  3. globally, across all discount policies

We'll need to update our logic accordingly.

/cc @jace @vidya-ram

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions