Authority remapping (MODMARCMIG-10)

[MODMARCMIG-5] POST endpoint: Register new marc-migration operation Created: 12/Dec/23  Updated: 05/Jan/24  Resolved: 05/Jan/24

Status: Closed
Project: mod-marc-migrations
Components: None
Affects versions: None
Fix versions: 1.0.0
Parent: Authority remapping

Type: Story Priority: P3
Reporter: Pavlo Smahin Assignee: Pavlo Smahin
Resolution: Done Votes: 0
Labels: back-end, epam-spitfire
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Attachments: PNG File MODMARCMIG-5_verified.png     PNG File MODMARCMIG-5_verified_central.png     PNG File MODMARCMIG-5_verified_member.png    
Issue links:
Gantt End to Start
has to be done before MODMARCMIG-6 Implement Async Records Mapping Mecha... Closed
has to be done before MODMARCMIG-8 Create Endpoint for Retrieving MARC M... Closed
Relates
relates to UXPROD-4082 Long term solution for applying mappi... In Progress
Sprint: Spitfire Sprint 181
Story Points: 5
Development Team: Spitfire
Release: Quesnelia (R1 2024)
Epic Link: Authority remapping

 Description   

Overview:

This story revolves around the implementation of a POST endpoint within the system to register a new MARC migration operation. The endpoint facilitates the registration of a migration operation specifically for the "AUTHORITY" entity type, focusing on "REMAPPING."

Requirements/Scope:

  1. Create a new POST endpoint specifically for registering MARC migration operations.
  2. Define the request body schema to include entityType and operationType parameters with specified enums for "AUTHORITY" and "REMAPPING" respectively.
  3. Implement the logic to register a new migration operation with a unique identifier and default status as "NEW."

Request Body Example (For POST /marc-migrations):

{
  "entityType": {
    "type": "string",
    "enum": ["AUTHORITY"]
  },
  "operationType": {
    "type": "string",
    "enum": ["REMAPPING", "IMPORT"]
  }
}
 

Response Body Example (After Successful Registration):

 

{
    "id": {
        "type": "uuid"
    },
    "userId": {
        "type": "uuid"
    },
    "entityType": {
        "type": "string",
        "enum": [
            "AUTHORITY"
        ]
    },
    "operationType": {
        "type": "string",
        "enum": [
            "REMAPPING",
            "IMPORT"
        ]
    },
    "status": {
        "type": "string",
        "enum": [
            "NEW",
            "DATA_MAPPING",
            "DATA_MAPPING_COMPLETED",
            "DATA_MAPPING_FAILED",
            "DATA_SAVING",
            "DATA_SAVING_COMPLETED",
            "DATA_SAVING_FAILED"
        ]
    },
    "total_num_of_records": {
        "type": "integer"
    },
    "processed_num_of_records": {
        "type": "integer"
    },
    "start_time_mapping": {
        "type": "string",
        "format": "date-time"
    },
    "end_time_mapping": {
        "type": "string",
        "format": "date-time"
    },
    "start_time_saving": {
        "type": "string",
        "format": "date-time"
    },
    "end_time_saving": {
        "type": "string",
        "format": "date-time"
    }
}
 

 

 

Approach:

  1. Develop a new POST endpoint to handle MARC migration operation registrations.
  2. Create database table to store migrations

Acceptance Criteria:

  • The POST endpoint for MARC migration registrations is successfully implemented.
  • Upon successful registration, the system generates a unique identifier and sets the operation status as "NEW".
  • Covered by unit tests.
  • Logging well-defined.


 Comments   
Comment by Valery_Pilko [ 05/Jan/24 ]

Verified on Snapshot and on ECS-spitfire rancher env - works as expected.
See attached screenshots:
1) Snapshot

2) ECS rancher - Central tenant - only Shared records are shown

3) ECS rancher - Member tenant - only Local records are shown

Generated at Thu Feb 08 22:31:53 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.