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

update fix encumbrances script to Q version #1493

Open
shelleydoljack opened this issue Jan 28, 2025 · 2 comments
Open

update fix encumbrances script to Q version #1493

shelleydoljack opened this issue Jan 28, 2025 · 2 comments

Comments

@shelleydoljack
Copy link
Contributor

The fix encumbrances script has a different version for Quesnelia. https://github.com/folio-org/mod-finance-storage/tree/master/scripts/fix_encumbrances
We need to use this new script when we upgrade to Q.

@ahafele
Copy link

ahafele commented Feb 13, 2025

In preparation for a rollover test on Q, Acq has done some reporting to see if the data is in order. They would like to have this new Fix Encumbrance script run to see if it resolves some of the problematic data. I'm including the text of an email from Suzette below.

In the rollover review please see the section “Pre-rollover cleanup and reports”. I ran the report to check the order status and re-encumber fields of the transactions (numbers 1-2). We are not checking number 3 because we’re not planning to rollover encumbrance amounts.

In the attached reports, column R “match order status” shows where there are mismatching order statuses. For example, the order is Open but in the transaction it says Pending. Here is sample json of a transaction:

{
"id": "bd6ee299-0b1b-56d7-9be2-4a1187005b83",
"amount": 0.0,
"source": "PoLine",
"_version": 2,
"currency": "USD",
"metadata": {
"createdDate": "2024-08-24T13:20:08.356Z",
"updatedDate": "2024-09-20T17:11:49.929Z",
"createdByUserId": "ffba9979-3f5d-4aac-a74f-18218dd2573f",
"updatedByUserId": "13706f0b-8e01-40d2-b763-e184ad9c6ff5"
},
"fromFundId": "9cee0ae4-7e9d-4476-a72c-84afc51f8b70",
"encumbrance": {
"status": "Pending",
"orderType": "Ongoing",
"reEncumber": true,
"orderStatus": "Pending",
"subscription": false,
"amountExpended": 0.0,
"sourcePoLineId": "ae74dc17-d728-453e-9f47-9af56fd6c1fe",
"amountAwaitingPayment": 0.0,
"sourcePurchaseOrderId": "bc6e3eb9-1863-50a0-997a-0cf26126c33c",
"initialAmountEncumbered": 0.0
},
"fiscalYearId": "9109e7fe-712f-4e76-90eb-c2862715badb",
"transactionType": "Encumbrance"
}

The field that needs to be corrected is “orderStatus”. The correct order status is in column N “po_status”. This should replace what is in column J “t_enc_order_status”. There are 83 transactions that need to be corrected in test. In prod, there are 697. However, we think the new encumbrance script designed for Quesnelia might correct this: https://github.com/folio-org/mod-finance-storage/tree/master/scripts/fix_encumbrances (see “fix_encumbrances_quesnelia.py”). Can LibSys run this and then I can run this report again to check? Basically these should be corrected first before we run a rollover test.

As for the re-encumber fields, the transactions and the orders all match, so there are no corrections needed for that.

Thanks! Let me know if you have any questions or want to chat over Zoom for clarifications.

Best,
Suzette

@ahafele
Copy link

ahafele commented Feb 13, 2025

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

No branches or pull requests

2 participants