Open-event-server: Discount Code API does not has relationship to tickets

Created on 14 Jun 2018  路  5Comments  路  Source: fossasia/open-event-server

Describe the bug
Currently Discount code api does not has one to many relationship for tickets. Since one discount code can be applied to many tickets so there should be a relationship from discount code to tickets.

Expected behavior

  • There should be a one to many relation between discount code and tickets.
  • There is a tickets field in Discount code API which should be removed. It does not make any sense to have tickets as string with value either event or ticket.

Parent issue

4940

has-PR

Most helpful comment

@srv-twry There is one more field there which is user-for. IMO that is the field that defines its behaviour.
@schedutron you can work on this.

All 5 comments

Are you working on it or can I take this one?

There is a tickets field in Discount code API which should be removed. It does not make any sense to have tickets as string with value either event or ticket.

It is to identify whether the discount code is only for tickets of the currrent event or can be applied to every event.

The behaviour of discount code is very tricky to understand and I would recommend reading this: https://blog.fossasia.org/discount-codes-in-open-event-server/

@srv-twry There is one more field there which is user-for. IMO that is the field that defines its behaviour.
@schedutron you can work on this.

Thanks, understood :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shubham-padia picture shubham-padia  路  4Comments

CosmicCoder96 picture CosmicCoder96  路  4Comments

SaptakS picture SaptakS  路  3Comments

dr0pdb picture dr0pdb  路  4Comments

iamareebjamal picture iamareebjamal  路  4Comments