All work

Select view

Select search mode

 
50 of 431

Error when cancelling a paid invoice with 2 invoice-level adjustments using the same fund and expense class

Done

Description

Overview:

Steps to Reproduce:

Case 1

  1. Create an invoice

  2. Add 2 invoice-level adjustments using the same fund and expense class, but different amounts (not prorated)

  3. Approve and pay the invoice

  4. Cancel the invoice

Case 2

  1. Create an invoice

  2. Add 2 invoice-level adjustments using the same fund and expense class, and the same amounts (not prorated)

  3. Try to approve the invoice

Expected Results:

The invoice is cancelled (case 1) or approved (case 2).

Actual Results:

An error occurs: duplicate key value violates unique constraint "transaction_payment_idx_unique"

Additional Information:
When the invoice is cancelled, the records end up with the same amount and this creates a conflict with the unique key

Interested parties:

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

No UI workaround after the invoice is approved. Before that, avoid using more than 1 invoice-level adjustment with the same fund and expense class. With access to the database, a workaround is to delete the "transaction_payment_idx_unique" index in mod-finance-storage. But this means updates to the module should not have the index in the schema, otherwise the updates will fail.

Attachments

4

relates to

Checklist

hide

Details

Assignee

Reporter

Priority

Story Points

Development Team

Thunderjet

Fix versions

Release

Sunflower (R1 2025) Bug Fix

RCA Group

TBD

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created April 1, 2025 at 3:21 PM
Updated April 4, 2025 at 3:13 PM
Resolved April 3, 2025 at 12:44 PM

Activity

Show:

NinaChistovaApril 4, 2025 at 3:13 PM

Tested on bugfest

Works as expected

Joseph ReimersApril 4, 2025 at 2:58 PM

Verified in Bugfest

JenkinsNotificationsApril 4, 2025 at 11:50 AM

Module mod-finance-storage was deployed to sunflower bugfest environment with version 8.8.2.

NinaChistovaApril 4, 2025 at 6:52 AM

Tested on eureka snapshot, works as expected

could you please review? Thank you!

Serhii_NoskoApril 3, 2025 at 12:43 PM

mod-finance-storage v8.8.2 (Sunflower) released https://github.com/folio-org/mod-finance-storage/releases/tag/v8.8.2

TestRail: Cases
TestRail: Runs

Flag notifications