Product code is not marked as unique in Orderable

Description

The product code is unique and it should be enforced both on the application and database levels. Currently it is not enforced at all.

Environment

None

Activity

Show:
Josh Zamor
July 5, 2017, 8:35 PM

Lets not address archiving at the moment. I think to fix this bug we should simply mark the product code as globally unique.

I don't expect product codes to be unique just per program: the Orderable/product code's definition isn't program oriented from what I've seen.

Brandon Bowersox-Johnson
July 5, 2017, 11:32 PM

Nick, Brandon and Mary Jo all talked and we are comfortable with Josh's suggestion (to make the product code globally unique for now).

Paweł Gesek
August 22, 2017, 3:54 PM

for this ticket, we need to check if it is possible to create duplicate orderables - it shouldn't be. You have to this through Swagger.

Joanna Bebak
August 24, 2017, 10:41 AM

I checked, and everything works correctly. One can't add a new orderable with a product code that is already used by a different orderable. When using a unique product code, one can add a new orderable.

Paweł Gesek
August 24, 2017, 2:19 PM

Root cause: we lacked constraints in the db again - but I believe recently we put more attention to reviewing schema changes.

I appreciate moving this to done after a long time rotting in the column, but we have more important things in QA then this ticket.

Done

Assignee

Paweł Gesek

Reporter

Sebastian Brudziński

Labels

None

Story Points

1

Time tracking

0m

Time remaining

0m

Components

Sprint

None

Fix versions

Priority

Minor