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

Migration Pathways between Open mSupply -> Mobile/Desktop : v2.0.0 Release Testing #3699

Closed
60 of 79 tasks
nisha-dangol opened this issue Apr 29, 2024 · 13 comments
Closed
60 of 79 tasks
Assignees
Labels
Build tested: issues found Issue has been build tested with new issue(s) made for failed tests. Migrate Existing Desktop Migrating Existing Mobile Testing

Comments

@nisha-dangol
Copy link

nisha-dangol commented Apr 29, 2024

Migrate from desktop to oms

Setting up some data in desktop-OG first

  • Setup a remote desktop site syncing with at least v7-14-00 mSupply Cloud
  • Create some locations
  • Create some barcodes
  • Create some transactions like invoices, requisitions and returns in both nw & fn status
    • Make transactions from desktop to desktop
    • Also make transactions from desktop to oms and vice versa
  • Also create some repacks and stocktakes
  • Create some patient names and prescriptions
  • Create some users with some store-permissions

Extra currency-setup for desktop

  • Introduce multiple currencies
  • Create some transactions with different currencies
  • Also delete one of the currencies and note it (for later)

Extra setup to cover #2760

  • Create a facility-name1 and issue some stocks to that facility-name1 from your logged-in remote-store2.
  • Have all statuses of CI: sg, cn & fn on one date
  • On next date(make it gap of at least 3 months), create store1 from that very facility-name1
  • Initialise that new store1 and you'll see the corresponding SI's made as well
  • From current supplying remote-store2, check there are previous sg or cn CI's

Migrate desktop-OG to oms

  • In mSupply Cloud, reset hardware ID and application-mode (App name & App version) in that remote-site window
  • Reinitialise that site, this time from oms v2.0.0
  • Make sure the previously-set user-permissions are working fine: minor-problems: comment1
  • Make sure the locations appear fine
  • Make sure the barcodes appear fine
  • Check the previously made transactions
  • All the fn transactions should be fine
    • Previous CI's should appear under Outbound Shipments
    • Previous SI's should appear under Inbound Shipments
    • Previous SC's should appear under Outbound Returns
    • Previous CC's should appear under Inbound Returns
    • Previous IO's should appear under Internal Orders
    • Previous customer requisition should appear under Requisitions
    • Previous repacks and stocktakes should also appear correctly: some problems: comment2-point1&2
    • Previous patient-names and prescriptions should also appear correctly
  • Also check the nw or sg transactions
    • Try to process the nw CI; go ahead and finalise it
      • CI should get finalised
      • After proper sync, corresponding SI should be created in receiving-store : seeing some problems here: comment2-point3
    • Try to process the nw IO; go ahead and finalise it
      • IO should get finalised
      • After proper sync, corresponding customer-requisition should be created in receiving-store
    • Try to process the cn SC; go ahead and finalise it
      • SC/Outbound-Return should get finalised/shipped
      • After proper sync, corresponding Inbound-Return should be created in receiving-store
  • Make sure no lines are missing from transactions - I notice lines missing from stocktakes
  • Make sure the transaction statuses are also fine - bearable I'd say
  • Make sure the names, comments, reference, etc fields are populated correctly - Comments and reference field values don't sync in stock transfer #3738

Extra currency migrations test

  • Make sure the previous transactions created in different currencies reflect accordingly in oms
  • Prevoiusly deleted currency should not show up in oms

Extra tests to cover #2760

  • In store2, Check that previous sg or cn outbound shipment and try to issue them
  • In store1, check the previous SI and try to finalise it
    • You should not be able to proceed with those lines? - It gets on Hold by default, which I think is okay; will confirm in a while

Migrate from mobile to oms

Setting up some data in mobile-OG first

  • Setup a remote mobile site syncing with at least v7-14-00 mSupply Cloud
  • Create some transactions like invoices and requisitions in both nw & fn status
    • Make transactions from mobile to desktop
    • Also make transactions from mobile to oms and vice versa
  • Also create some stocktakes
  • Create some patient names and prescriptions

Migrate mobile to oms

  • In mSupply Cloud, reset hardware ID and application-mode (App name & App version) in that remote-site window
  • Reinitialise that site, this time from oms v2.0.0
  • Make sure the previously-set user-permissions are working fine
  • Check the previously made transactions
  • All the fn transactions should be fine
    • Previous CI's should appear under Outbound Shipments
    • Previous SI's should appear under Inbound Shipments
    • Previous customer requisition should appear under Requisitions
    • Previous stocktakes should also appear correctly -same problem as above
    • Previous patient-names and prescriptions should also appear correctly
  • Also check the nw or sg transactions
    • Try to process the nw CI; go ahead and finalise it
      • CI should get finalised
      • After proper sync, corresponding SI should be created in receiving-store
    • Try to process the nw IO; go ahead and finalise it
      • IO should get finalised
      • After proper sync, corresponding customer-requisition should be created in receiving-store
    • Try to process the nw stocktake; go ahead and finalise it -same problem as above
      • Stocktake should get finalised and there should be added stocks in the store afterwards
  • Make sure no lines are missing from transactions -same problem as above
  • Make sure the transaction statuses are also fine
  • Make sure the names. comments, reference, etc fields are populated correctly - FAILED : Comments and reference field values don't sync in stock transfer #3738
@roxy-dao
Copy link
Contributor

roxy-dao commented Apr 30, 2024

Just reiterating from meeting:

For #2760, the invoices have to be older than store creation date by 3 months. So would probably need some data manipulation, can you do that through record browser? Or change the time on your device (;

The rest of the tests sound good to me!

@nisha-dangol
Copy link
Author

nisha-dangol commented May 1, 2024

Just reiterating from meeting:

For #2760, the invoices have to be older than store creation date by 3 months. So would probably need some data manipulation, can you do that through record browser? Or change the time on your device (;

The rest of the tests sound good to me!

yup, can do in v2.0.0-rc2.

@nisha-dangol
Copy link
Author

nisha-dangol commented May 1, 2024

  • Make sure the previously-set user-permissions are working fine

Just noticed that; users created from remote-desktop site after migrating to oms, now those users won't show up; which is technically correct because those users by default are Inactive on mSupply cloud and users in oms are syncing currently to Cloud
Is there anything that can be done about this for smooth transition from desktop to oms or we discard this and warn people to ensure/configure the users first in mSupply Cloud before converting to oms? @roxy-dao @Chris-Petty

@nisha-dangol
Copy link
Author

nisha-dangol commented May 1, 2024

Further observations/questions:

  1. Repacks created from desktop (left in sg status), after converted to oms-store; now can't be processed at all. They do show up in history, but looks like no way to proceed. Should there be new issue to address this? or we can just leave it?
  2. Stocktake finalised in desktop, after converted to oms-store shows no items entry at all. I'm guessing this is an open issue for mSupply v7.14.XX : #https://github.com/msupply-foundation/msupply/issues/14624 , but I can be wrong as well. Good to confirm @roxy-dao and we can submit another issue if needed?
  3. I also see this issue where the old outbound-shipments when trying to process after converting to oms now does not generate corresponding Inbound at all; there's no SI record in mSupply Cloud either: Video reference
    PS: Also flops for the returns

@roxy-dao
Copy link
Contributor

roxy-dao commented May 1, 2024

  1. Please create an issue to address this.
  2. Yeah, unfortunately have to wait until that issue is merged in OG for stocktake lines to merge again. I'll check with @JonnaQuismundo if it is still going in a patch.
  3. The 2023-12-12 shouldn't have a corresponding IS 🤔

@Chris-Petty
Copy link
Contributor

  1. Yes it is going in patch, I will review today
  2. I must be misunderstanding, you mostly emphasise that the new SI exists for the old CI that you recently finalised, which is expected? Which SI is missing?

I see how you're doing the migration and that is very unconventional and definitely not how migration will be done in production so I'm worried about validity of tests there. You should wipe the datafile on OMS and reinitialise generally, though that is a bit of a chore 😕.

@nisha-dangol
Copy link
Author

nisha-dangol commented May 2, 2024

  1. I must be misunderstanding, you mostly emphasise that the new SI exists for the old CI that you recently finalised, which is expected? Which SI is missing?

@Chris-Petty here's the breakdown of the steps for Scenario 3:

  • create a store on 2022-12-12
  • create a CI (of ‘nw’ status, and note it has to be a stock-transfer, i.e., create CI to another store) on desktop-remote-siteA on 2023-12-12 and sync completely
  • move that remote-siteA to oms v2.0 by completely clearing the hardware ID & all, then re-initialise on oms on today’s date: 2024-05-02
  • now in oms-siteA, check that previously created CI of 'nw/sg' status
  • finalise it (In oms language, change status to Shipped) and sync
  • for the receiving-storeB, the corresponding SI is not created at all - this SI is the one missing.

@nisha-dangol
Copy link
Author

nisha-dangol commented May 2, 2024

  1. Please create an issue to address this.
  2. Yeah, unfortunately have to wait until that issue is merged in OG for stocktake lines to merge again. I'll check with @JonnaQuismundo if it is still going in a patch.
  3. The 2023-12-12 shouldn't have a corresponding IS 🤔

@Chris-Petty @roxy-dao

  1. Submitted issue: msupply-foundation/msupply#14695
  2. Will wait for v7.14.XX/v7.15 and re-try again after I get that installer
  3. For now, I've submitted SI's are missing when their CI's were initially created in desktop, then migrated to oms and finalised later #3734 with details, this can be discussed then decide to proceed or discard accordingly

@nisha-dangol nisha-dangol added the Build tested: issues found Issue has been build tested with new issue(s) made for failed tests. label May 2, 2024
@nisha-dangol
Copy link
Author

While testing mobile-oms migrations, at one point, I ended up migrating back from oms to mobile, which I know is very unlikely to happen at all; but here's one interesting issue:

  • created prescriptions in mobile and synced
  • converted it to oms and synced
  • converted it back to mobile again and synced
  • that prescription now appears under 'Customer Invoices'

@Chris-Petty
Copy link
Contributor

  1. I must be misunderstanding, you mostly emphasise that the new SI exists for the old CI that you recently finalised, which is expected? Which SI is missing?

@Chris-Petty here's the breakdown of the steps for Scenario 3:

* create a store on 2022-12-12

* create a CI (of ‘nw’ status, and note it has to be a stock-transfer, i.e., create CI to another store) on desktop-remote-siteA on 2023-12-12 and sync completely

* move that remote-siteA to oms v2.0 by completely clearing the hardware ID & all, then re-initialise on oms on today’s date: 2024-05-02

* now in oms-siteA, check that previously created CI of 'nw/sg' status

* finalise it (In oms language, change status to Shipped) and sync

* for the receiving-storeB, the corresponding SI is not created at all - this SI is the one missing.

Is the receiving-storeB also OMS?

For reference the OMS code that should affect this:

if let Some(created_date) = store.created_date {
let store_created_datetime = NaiveDateTime::new(
created_date - Duration::days(30),
NaiveTime::from_hms_opt(0, 0, 0).unwrap_or_default(),
);
let invoice_created_datetime = outbound_shipment.invoice_row.created_datetime;
if invoice_created_datetime < store_created_datetime {
return Ok(None);
}
}

If storeB is on OMS it is seeing is an invoice made on 2023-12-12, and storeB was created on ????. If storeB.created_date is >2024-01-12 then it will not make the SI (and the central server won't have it either).

@nisha-dangol
Copy link
Author

@Chris-Petty here's the breakdown of the steps for Scenario 3:

* create a store on 2022-12-12

* create a CI (of ‘nw’ status, and note it has to be a stock-transfer, i.e., create CI to another store) on desktop-remote-siteA on 2023-12-12 and sync completely

* move that remote-siteA to oms v2.0 by completely clearing the hardware ID & all, then re-initialise on oms on today’s date: 2024-05-02

* now in oms-siteA, check that previously created CI of 'nw/sg' status

* finalise it (In oms language, change status to Shipped) and sync

* for the receiving-storeB, the corresponding SI is not created at all - this SI is the one missing.

Is the receiving-storeB also OMS?

Yes, it is.


If storeB is on OMS it is seeing is an invoice made on 2023-12-12, and storeB was created on ????. If storeB.created_date is >2024-01-12 then it will not make the SI (and the central server won't have it either).

storeB was created way before 2024, somewhere around 2023-07-xx. FYI, I've submitted the details in another issue already regrading this: #3734

@nisha-dangol
Copy link
Author

nisha-dangol commented May 13, 2024

  1. Submitted issue: Post migrations from desktop, previous 'sg' repacks now cannot be processed at all #3733
  2. Will wait for v7.14.XX/v7.15 and re-try again after I get that installer
  3. For now, I've submitted SI's are missing when their CI's were initially created in desktop, then migrated to oms and finalised later #3734 with details, this can be discussed then decide to proceed or discard accordingly

1. & 3. will be further addressed in v2.1.0
For 2. , will need to wait for mSupply v7.14.XX installer until https://github.com/msupply-foundation/msupply/pull/14649

@nisha-dangol
Copy link
Author

For 2. , will need to wait for mSupply v7.14.XX installer until msupply-foundation/msupply#14649

Checked this again with mSupply v7-14-02 :

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build tested: issues found Issue has been build tested with new issue(s) made for failed tests. Migrate Existing Desktop Migrating Existing Mobile Testing
Projects
None yet
Development

No branches or pull requests

3 participants