Create and update endpoints modified to validate MARC record based on MARC specification

Description

Requirements

  1. Create and update endpoints modified to validate MARC record based on MARC specification

    1. return validation issues only if it has at least one issue with ERROR severity and prevent saving

    2. response body for validation issues should same as in https://folio-org.atlassian.net/browse/MODQM-433

    3. endpoints are:
      https://s3.amazonaws.com/foliodocs/api/mod-quick-marc/s/records-editor-async.html#tag/records-editor-async/operation/putRecord
      https://s3.amazonaws.com/foliodocs/api/mod-quick-marc/s/records-editor.html#tag/records-editor/operation/createNewRecord

    4. do validation before any other process

  2. Bump major version of API (don’t merge until UI updates it)

  3. Create Karate tests update story

Environment

None

Potential Workaround

None

Attachments

17
  • 08 Oct 2024, 01:52 PM
  • 08 Oct 2024, 01:52 PM
  • 08 Oct 2024, 01:52 PM
  • 08 Oct 2024, 01:52 PM
  • 08 Oct 2024, 01:52 PM
  • 08 Oct 2024, 01:52 PM
  • 08 Oct 2024, 01:52 PM
  • 08 Oct 2024, 01:52 PM
  • 08 Oct 2024, 01:52 PM
  • 08 Oct 2024, 01:52 PM
  • 08 Oct 2024, 01:52 PM
  • 08 Oct 2024, 01:52 PM

Checklist

hide

Activity

Show:

Valery_Pilko October 9, 2024 at 3:33 PM

Hey - separate ticket created https://folio-org.atlassian.net/browse/MODQM-451

Current story is ready for PO review.

Pavlo Smahin October 9, 2024 at 10:05 AM

it will be helpful!

Valery_Pilko October 9, 2024 at 9:07 AM

- should I create a ticker for it?

Pavlo Smahin October 9, 2024 at 8:29 AM

Hey , as for your question it’s more tech-dept that existed from time when we implement the authority control feature. I believe we could postpone it.

Valery_Pilko October 8, 2024 at 1:52 PM

Re-tested on Snapshot environment:

  1. Found issues are fixed, user can create and derive new marc bib record, see attached screencast:

    MODQM-434_issue_fixed.webm

     

  2. User cannot Create/Edit MARC record via API using mod-quick-marc endpoints if record has Fail errors.
    See screenshots for example:
    No required field:

    image-20241008-123306.png


    Multiple not-repeatable fields:

    image-20241008-123409.png


    Undefined field:

    image-20241008-124046.png


    Invalid field tag:

    image-20241008-124105.png


    Invalid indicator:

    image-20241008-130318.png


    Undefined indicator:

    image-20241008-130427.png


    No required subfield:

    image-20241008-130902.png


    Not-repeatable subfield:

    image-20241008-130925.png


    Undefined subfield:

    image-20241008-131540.png


    Not-repeatable 1XX:

    image-20241008-131602.png


    Question:
    Hey , - could you please review the question below?
    On UI we have validation for cases when linkable (but not linked field) has $9 / linked field has additional $9 added by user
    See attached screenshots for example:

    image-20241008-131935.png
    image-20241008-132029.png


    Should we have validation for case when user added $9 subfield in linkable field manually on back-end side?
    I’m asking because if user added $9 in linkable field manually via API request - record will not be created/updated because of error.
    See attached screenshots:

    image-20241008-135035.png
    image-20241008-135119.png
        "errorMessage": "io.vertx.core.impl.NoStackTraceThrowable: {\"errors\":[{\"message\":\"must match \\\"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$\\\"\",\"type\":\"1\",\"code\":\"jakarta.validation.constraints.Pattern.message\",\"parameters\":[{\"key\":\"contributors[0].authorityId\",\"value\":\"test\"}]}]}",



Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Spitfire

Fix versions

Release

Ramsons (R2 2024)

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created July 5, 2024 at 7:58 AM
Updated October 31, 2024 at 12:30 PM
Resolved October 10, 2024 at 6:17 PM
TestRail: Cases
TestRail: Runs

Flag notifications