Add the field "GTIN" to the tradeitem so that we can support the storage of a GTIN. GTIN is currently up to 14 digits long, though a valid number could be less (GTIN-8, 13, ...) and could change. Additionally GTIN's currently do not support non-digit characters. GTIN pamphlet.
Acceptance Criteria
GTIN is optional and not required.
A new value object exists in reference data that encapsulates GTIN and it's validation.
Thank you. I made a re-test, and now everything works in accordance with your recommendations.
Josh Zamor
February 9, 2018 at 5:07 PM
Nice catches . When I wrote this ticket I did purposefully move some validation of the GTIN out into: which is out of 3.3 scope intentionally. Further since I wrote this I realized there's a discrepancy in what the pamphlet wrote and how I interpreted it: they wrote digits, but then wrote leading 0s if given should be preserved. At first I thought we wouldn't need that, however I've seen some further references for why we would actually want to keep.
To summarize:
Could we validate the GTIN is between 8 and 14 digits, and would validate it's one of the 4 current types.
Keep the GTIN as a string as it is in code today, and don't strip leading zeros, as it is today.
Do everything else recommends.
Joanna Bebak
February 9, 2018 at 12:47 PM
I tested the ticket, and found some issues:
1. Please add the changelog.
2. According to ACC, the GTIN can be up to 14 digits long at maximum. In fact, it can be longer than that - I managed to add a GTIN to a trade item that was 150-digit-long. Also, if I understand the ACC and the information on the GTIN pamphlet correctly, there should be only four formats of GTINs supported: GTIN-8, GTIN-12, GTIN-13 and GTIN-14, i.e. it should be possible only to add GTINs that are 8-, 12-, 13- or 14-digit long. Currently, it is possible to add a GTIN that is only e.g. 1- or 2-digit long, up to even 150 digits, as I mentioned above.
Apart from that, everything works correctly.
Sebastian Brudziński
February 1, 2018 at 5:08 PM
We don't need to add leading zeros at all
Paweł Albecki
February 1, 2018 at 3:17 PM
Should leading zeros be added when persisting or in endpoint that get trade items?
Done
Pinned fields
Click on the next to a field label to start pinning.
Add the field "GTIN" to the tradeitem so that we can support the storage of a GTIN. GTIN is currently up to 14 digits long, though a valid number could be less (GTIN-8, 13, ...) and could change. Additionally GTIN's currently do not support non-digit characters. GTIN pamphlet.
Acceptance Criteria
GTIN is optional and not required.
A new value object exists in reference data that encapsulates GTIN and it's validation.
Update JSON schema of TradeItem
Enforce global uniqueness of the GTIN