Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Product on Inventory when Product is confirmed in CCRS #68

Open
djbusby opened this issue Jul 5, 2023 · 6 comments
Open

Invalid Product on Inventory when Product is confirmed in CCRS #68

djbusby opened this issue Jul 5, 2023 · 6 comments

Comments

@djbusby
Copy link
Member

djbusby commented Jul 5, 2023

Trying to import Inventory Item '01H0NBNPWAT6R254'

It fails with a rejection from CCRS: "Invalid Product"

The Product is "WAJ430957.TYKTMWF" with the name="flower lot"

This Product definition has been shipped to CCRS at least 10 times.

On INSERT the Product upload we get the error "Duplicate External Identifier"
This error is expected, it means the product definition does exist in CCRS.

On UPDATE no error is received; which indicates the UPDATE is successful.

This confirms to us that this product is in CCRS and does have the name we've requested: "flower lot"

When we upload inventory with this Product -- we get a failure: "Invalid Product"


The core issue is that CCRS does not link by Primary Identifiers
I'm 100% certain this issue is related to name based lookups.
Since at least 1976 it's been a known good idea to use Primary Identifiers on these mapptings.
For example, uploading a Section by ID and Name, then a Product by ID and Name.
Then when uploading Inventory rather than Name-based columns, one could use ID-based.
This ancient method removes very large classes of bugs -- which this issue very much looks like.

@djbusby djbusby changed the title Invalid Product on Inventory when Product is confirmed in CCRS. Invalid Product on Inventory when Product is confirmed in CCRS Jul 5, 2023
@djbusby
Copy link
Member Author

djbusby commented Jul 5, 2023

Should be noted that this issue is affecting 1590 records across 28 licensees. Details in internal document; emailed to LCB.

@djbusby
Copy link
Member Author

djbusby commented Jul 5, 2023

IR80288

@Panpsychism
Copy link

Do you have this list of affected licensees?

@djbusby
Copy link
Member Author

djbusby commented Oct 11, 2023

This is not a list we are able to share publicly; we have provided it to the LCB. The list only included licensees on our hosted/managed plaform. We have no visibility to those with self-hosted OpenTHC or those on other platforms.

Additionally, the work-around is to make an attempt to remove the errant Product records via DELETE to CCRS. Then re-create Product definitions w/new IDs; remap your local database and upload based on that.

@Panpsychism
Copy link

Panpsychism commented Oct 11, 2023 via email

@djbusby
Copy link
Member Author

djbusby commented Apr 26, 2024

Appear to be observing this issue again.

  • PRODUCT UPLOAD 01HWE0BFEPCMQYE4BQ3C3F1YHN
  • PRODUCT UPLOAD 01HWE0D5BF2567FFPJNHNK476F
  • INVENTORY UPLOAD 01HWE11JF76VERFC4YEEV1MFSG

IR95087

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants