Improve error messages for importers to be more specific

Description

The migration import gives vague errors and does not indicate the problem. See attached support ticket.

Error currently includes line number and tag number. Update to include field (for example bad asset class value) or column heading (if column heading is misnamed) problem pertains to.

24372: item import, error includes tag number and line number, but states “Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Error while committing

  • problem was the value in the import file for condition code did not contain the correct 2 digit code, but they included the description of the code (New, Used) instead. They had several columns of data in the import file that had similar problems, improper format. Field formats are documented, but we need to produce a user friendly error that indicates the problem.

24207: item import, this was also data issues that resulted in the same exception listed above. They were not including the correct value or included location number but no location category. Condition code listed the description instead of the code value.

25083: disposition import, this error was related to missing leading zeros in the tag number, so the tag numbers they were trying to update didn’t exist in the database.

  • Error displays tag number and the line number of the file, but then states “could not execute statement; SQL [n/a]; constraint…ConstraintViolationException: could not execute statement

    • Update to this support ticket: The CSV attached to the ticket and what I tested/suggested to resolve is all with the Disposition import. Support staff believes they attached the wrong Error report to the ticket.

26349: item import, this one we recently discussed in a sprint meeting. We ended up using the trim() to remove extra spaces. The CSV file was generated from a different software and the data contained spaces after the value. I believe this one should no longer be a problem due to https://mcoecn.atlassian.net/browse/INV-615. This issue started with the item import but then they were instructed to use the migration importer because of the dates (prior years).

24614: migration import:

  • column names incorrect prevented loading of asset class; we need to validate the column names and provide a user friendly error message that tells them what values are incorrect

  • same rollback exception as above due to incorrect formatting of the asset class data (leading zero was not preserved) so it was seeing 300 instead of 0300.

  • They also ended up with spaces in the data values (this is another new instance that didn’t migrate from classic), so the trim() fix in https://mcoecn.atlassian.net/browse/INV-615 corrects this bullet point.

is related to

Activity

Show:

Scott Willmarth March 17, 2025 at 4:56 PM

The importer template for Inventory Items will need to be updated as it has some minor misspellings in its headers. We do not want the importer to run if the headers are incorrect. The importer will still run if the files has other mistakes, but the header fields will need to be corrected first.

Scott Willmarth March 11, 2025 at 3:08 PM
Edited

No issue related to disposition importer (25083)

Scott Willmarth January 17, 2025 at 9:25 PM
Edited

Testing:

  • Updated importers to verify headers fields before trying to import (24614)

    • Import Result report should display field names it does not recognize and stops the import if any are found. They will need to update/remove fields that do not have the correct names in order to import

      • If there are no issues with the headers the importer should run even if the file has other issues

    • Valid field names for each importer can be found in the Import wiki

  • Updated Inventory Item importer to check length of fields before trying to use them

    • 1-2 digits: Condition Code

    • 1-4 digits: Category Code, Asset Class, Function, Fund

    • < 8 digits: Organization Code

    • Import Result report should display invalid field values and the appropriate length

  • There weren’t any issue related to the disposition importer (25083) so no changes need to be tested.

Details

Assignee

Reporter

Times Requested

4

QA Reviewers

Haley Miller

QA Assignee

Story Points

Time tracking

3d 4h logged

Sprint

Fix versions

Priority

Better PDF Exporter

Created September 3, 2024 at 4:15 PM
Updated 4 days ago