Juniper HF3 - Batch voucher ID not found after manual export

Description

Overview: When running voucher exports, even though I know there are vouchers that exist for the time frame. No file is returned to the UI so it appears the export fails but the success taos is shown.

Steps to Reproduce: It is not clear if this relates to the number of vouchers expected etc. The library is trying to keep the files small and so they only approve between 10 and 20 invoices before running an export. It seems to randomly fail to generate a Batch voucher for the export as they still have successful exports and some failures. Most recently they are running the Juniper HF3 release of FOLIO and still having this occur.

  1. Log into Bugfest-juniper

  2. Create invoice with "Export to accounting" = true

  3. Batch group = test group

  4. Add invoice line for amount >0

  5. Approve invoice

  6. Navigate to settings

  7. Make sure format is set for batch group

  8. Run export

Expected Results: Export successful, export entry appears in list with download icon. User can download Batch voucher in chosen format

Actual Results: Export success message shown, entry appears in list as pending with no batch voucher ID. No download icon

*Additional Information: see bugfest Iris 
URL: 
Interested parties:  

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Attachments

14

Checklist

hide

TestRail: Results

Activity

Show:

Oleksandr DmytriievNovember 19, 2021 at 2:46 PM

MODORDER-312 duplicate

Andriy KundyukovNovember 19, 2021 at 2:27 PM

I reproduced this issue locally on the version identical to Juniper HF#3.

I saw exactly the same messages in logs:

NullPointerException
at org.folio.services.voucher.BatchVoucherGenerateService.buildBatchedVoucherLines(BatchVoucherGenerateService.java:156)

and:

GET /batch-voucher-storage/batch-vouchers/null?lang=en

 

Afterwards I updated to the later version locally and followed the same exact steps. Export was successful and naturally no similar errors appeared in logs.

 

You mentioned:

... they only approve between 10 and 20 invoices before running an export. It seems to randomly fail ...

This further supports the hypothesis that it's the same exact problem that was fixed under .

When they only export a total of 14 lines it should work fine, but if they export 16 or more it is likely to fail (in the comment above this one Damien provided a very detailed description of when the failure occurs).

 

So the conclusion is that it's the same problem that is fixed in the latest hotfix and updating should solve the issue.

DamienNovember 18, 2021 at 6:16 PM

  I have not tried to reproduce it yet. The crash happens when there is no line returned for a given voucher, while the missing line happens when some lines of a voucher are returned but not all of them. To get a crash, we would need to have 15 or less vouchers total, the first vouchers with at least 15 lines total, and at least an additional voucher with at least one line. Only 15 lines would be returned, and the last voucher would not have any line returned. Since this is probably fixed on Juniper, we could test it on Iris (or by using an older version of mod-invoice).

Dennis BridgesNovember 18, 2021 at 5:18 PM

 have you actually been able to reproduce the result where NO voucher ID is provided? Or do you get a voucher with missing lines? If we can bridge that gap I think we could safely say that should address this problem.

DamienNovember 18, 2021 at 3:56 PM

From the logs, 15 voucher lines are returned but totalRecords is 17. And missing lines can create exactly the error at BatchVoucherGenerateService.java:156 when the batch voucher export is created and the batch voucher is generated. So is really affecting the test case.

Duplicate

Details

Assignee

Reporter

Tester Assignee

Priority

Story Points

Sprint

Development Team

Thunderjet

Release

Not Scheduled

Affected Institution

MI State University/Library of Michigan

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created November 16, 2021 at 2:27 PM
Updated November 19, 2021 at 2:46 PM
Resolved November 19, 2021 at 2:46 PM
TestRail: Cases
TestRail: Runs