Report affected instance when export contains negative number of failed records

Description

Purpose/Overview:
As described in https://folio-org.atlassian.net/browse/MDEXP-415#icft=MDEXP-415, if the exported instance record has two (or more) SRS records associated with it, the export log will contain negative value of records failed to export:

In libraries the issue is common and difficult to troubleshoot, especially if the export include thousands of records and the logs for successful jobs are not available.

Requirements/Scope:
If the export jobs finishes with the status Completed but the number of Failed records is negative then

  1. the Log columns display following information:

    1. Exported column is populated with jobExecution.progress.exported

    2. Failed column is populated with Math.abs( jobExecution,progress.exported) followed by "duplicate(s). For example -1 failed record will be represented as "1 duplicate(s)" value set to positive value. If the value of the failed records is => 0 then the word "duplicate(s) is not present.

    3. Total column is populated with jobExecution.progress.total

  2. the logs should be available and contain following information:

    1. date, time

    2. log level (set to ERROR )

    3. Reason for the error: "Instance with HRID: <hrid> has following SRS records associated: <SRS-UUID1>, <SRS-UUID2>,..,<SRS-UUIDn>"

    4. Details of the affected instance UUID, HRID, Title and link to the record (as already implemented for other types of errors):

    5. each affected instance has a separate entry in the log

Approach:

Acceptance criteria:

  • Requirements are met

  • Unit tests are written

  • API tests are written/updated and tests passed successfully (screenshot added)

  • Migration scripts are provided if applicable

Environment

None

Potential Workaround

None

Attachments

12
  • 29 Sep 2023, 02:55 PM
  • 29 Sep 2023, 02:55 PM
  • 29 Sep 2023, 02:55 PM
  • 29 Sep 2023, 02:54 PM
  • 29 Sep 2023, 02:54 PM
  • 29 Sep 2023, 02:53 PM
  • 04 Aug 2023, 11:27 PM
  • 04 Aug 2023, 10:45 PM
  • 02 Aug 2023, 09:02 PM
  • 02 Aug 2023, 08:54 PM
  • 02 Aug 2023, 08:30 PM
  • 31 Jul 2023, 03:56 PM

Checklist

hide

TestRail: Results

Activity

Show:

Tatsiana Hryhoryeva September 29, 2023 at 2:59 PM

Hi .  

Verified on https://folio-snapshot.dev.folio.org/ environment, works as expected:

Scenarios:

1 duplicate -



2 duplicates -



1 record not found and 1 duplicate -



1 valid and 1 record not found and 2 duplicates -



1 record not found -

Story to address error code issue is https://folio-org.atlassian.net/browse/UIDEXP-345#icft=UIDEXP-345

Tatsiana Hryhoryeva September 27, 2023 at 7:33 AM

Hi please take a look to the Failed column, number of fails and number of duplicates

Yauheniya Kryshtafovich September 22, 2023 at 10:27 AM

Hi, please take a look to the Failed column, seems it works inconsistent
Ticket moved back in progress

Yauheniya Kryshtafovich September 15, 2023 at 9:43 AM

Hello, and during story verification it was noticed the following behavior for exporting MARC Authority records:
1. Navigate to ""MARC Authority" app and retrieve result list with records

2. Check two checkboxes that is displayed next to the "MARC Authority" records to export two records

3. Click on the "Actions" button on the second pane and select "Export selected records (CSV/MARC)" option

4. Go to "Data export" app and check the completed job 

Actual result:
The job is completed with "Completed with errors" status and report "1 duplicates":
023-09-15T08:43:29.145+00:00 ERROR ui-data-export.error.duplicateSRS
{
"Instance UUID": "UUID cannot be determined because record is invalid: SRS contains more than 1 record for 1 instance"
"Instance HRID": "HRID cannot be found if SRS contains more than 1 record for 1 instance"
"Instance Title": "Title cannot be found if SRS contains more than 1 record for 1 instance"
"Inventory record link": https://folio-snapshot.dev.folio.org/inventory/view/UUID cannot be determined because record is invalid: SRS contains more than 1 record for 1 instance
}
However, exporting those two records separately one by one does not report any errors and completed successfully
could you please take a look at the case?

Oleksandr Bozhko September 8, 2023 at 9:27 AM

Moved into blocked because UIDEXP-337 is not ready yet.

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Firebird

Fix versions

Release

Poppy (R2 2023)

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created July 31, 2023 at 3:56 PM
Updated February 9, 2024 at 2:16 PM
Resolved October 6, 2023 at 4:09 PM
TestRail: Cases
TestRail: Runs