Open roxy-dao opened 3 weeks ago
May need some UI changes too as I believe the Return Reasons
are configured on OMS central rather than OG Central. Migrating might also create headaches as OG Central won't have the "Options" unless OMS central translates/pushes Options back to OG central? We can make that work if syncv5 doesn't currently allow it though.
No it's configured in OG Central. Preferences -> Options -> Return reason
So some reason_options
will be configured on OMS and some will be on OG? How will OG know? It already has return reasons:
Good to have long term, not an issue atm
Does this make #5230 a non-start?
Does this make #5230 a non-start?
Can do 5230 first cause don't know when we'll get around to refactoring... 5230 should be a quick one....
The suggestion
Will need #5081 implemented first before this issue can be done.
Currently, we are creating a new table every time we implement a new option type from OG. This causes a lot of overhead whenever a new option is added in Open mSupply.
Migrate the data in the existing
Inventory Adjustment Reason
andReturn Reason
table to the newreason_options
table and make sure any foreign keys in invoice line/stocktake line for these two tables are pointing to the corresponding reason in the new table.Why should we invest time in this?
Makes it faster to add new options and keeps all the options in one place.
Are there any risks associated with this change?
Will need extra testing to ensure that the constraints in invoice lines and stocktake lines are still pointing to the correct 'adjustment/return reason'.
How much effort is required?
Maybe a day include adding tests for the migrations
Agreed Solution