[MODEXPW-86] Saving edited item locations Created: 31/Jan/22  Updated: 08/Apr/22  Resolved: 08/Apr/22

Status: Closed
Project: mod-data-export-worker
Components: None
Affects versions: None
Fix versions: 1.4.0

Type: Story Priority: P3
Reporter: Magda Zacharska Assignee: Siarhei Charniak
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Attachments: PNG File 000111222333444-after.png     PNG File 000111222333444-before.png     File 2022-04-05-Matched-Records-barcodes-modified.csv     PNG File A1429864347-after.png     PNG File A1429864347-before.png    
Issue links:
Defines
defines UXPROD-3523 Bulk Edit - in app approach - item lo... Closed
Relates
relates to FEXPCMN-4 Update schemas to support bulk-edit i... Closed
Sprint: Firebird Sprint 136, Firebird Sprint 137
Story Points: 3
Development Team: Firebird

 Description   

Purpose/Overview:
Once the user confirms the updates, the records are processed on the backed

Requirements/Scope:

  1. For each record temporary or permanent location is updated and effective location modified accordingly
  2. If the value is not provided, then the data is removed
  3. Permanent/temporary location changes are reflected in the updates to Effective item location as specified in https://folio-org.atlassian.net/wiki/display/FOLIOtips/Holdings+and+Items+Effective+Location+Logic+in+FOLIO#HoldingsandItemsEffectiveLocationLogicinFOLIO-ItemEffectiveLocation
  4. Errors that occur during the saving of the data are recorded and logged
  5. Count of the successful/failed updates is updated and it is accurate

Approach:

Acceptance criteria:

  • Location are updated
  • Errors are logged
  • Unit and API tests are written/updated


 Comments   
Comment by Siarhei Charniak [ 05/Apr/22 ]

Magda Zacharska

Verified on folio-snapshot-2

Check item locations before update

Post job command

curl --location --request POST 'https://folio-snapshot-2-okapi.dev.folio.org:443/data-export-spring/jobs' \
--header 'x-okapi-tenant: diku' \
--header "x-okapi-token: $TOKEN" \
--header 'Content-Type: application/json' \
--data-raw '{
  "type": "BULK_EDIT_UPDATE",
  "exportTypeSpecificParameters": {
      
  },
  "identifierType": "BARCODE",
  "entityType": "ITEM"
}'

Response

{
    "id": "183c07a1-b4c4-44ae-a149-2a0e3080b6e6",
    "name": "000003",
    "source": "diku_admin",
    "isSystemSource": false,
    "type": "BULK_EDIT_UPDATE",
    "exportTypeSpecificParameters": {},
    "status": "SCHEDULED",
    "metadata": {
        "createdDate": "2022-04-05T14:15:16.288+00:00",
        "createdByUserId": "e9f0d1f6-5df3-5bbc-bee2-a11b2359c815",
        "createdByUsername": "diku_admin",
        "updatedDate": "2022-04-05T14:15:16.288+00:00",
        "updatedByUserId": "e9f0d1f6-5df3-5bbc-bee2-a11b2359c815",
        "updatedByUsername": "diku_admin"
    },
    "identifierType": "BARCODE",
    "entityType": "ITEM"
}

Upload attached 2022-04-05-Matched-Records-barcodes-modified.csv file with modified records (permanent location for item barcode A1429864347 and temporary location for item barcode 000111222333444 set to "SECOND FLOOR")

curl --location --request POST 'https://folio-snapshot-2-okapi.dev.folio.org:443/bulk-edit/183c07a1-b4c4-44ae-a149-2a0e3080b6e6/upload' \
--header 'x-okapi-tenant: diku' \
--header "x-okapi-token: $TOKEN" \
--header 'Content-Type: multipart/form-data' \
--form 'file=@"/Users/siarhei/Desktop/2022-04-05-Matched-Records-barcodes-modified.csv"'

Response

2

Start job

curl --location --request POST 'https://folio-snapshot-2-okapi.dev.folio.org:443/bulk-edit/183c07a1-b4c4-44ae-a149-2a0e3080b6e6/start' \
--header 'x-okapi-tenant: diku' \
--header "x-okapi-token: $TOKEN" \
--header 'Content-Type: application/json'

Check job status - successful

curl --location --request GET 'https://folio-snapshot-2-okapi.dev.folio.org:443/data-export-spring/jobs/183c07a1-b4c4-44ae-a149-2a0e3080b6e6' \
--header 'x-okapi-tenant: diku' \
--header "x-okapi-token: $TOKEN" \
--header 'Content-Type: application/json'

Response

{
    "id": "183c07a1-b4c4-44ae-a149-2a0e3080b6e6",
    "name": "000003",
    "source": "diku_admin",
    "isSystemSource": false,
    "type": "BULK_EDIT_UPDATE",
    "exportTypeSpecificParameters": {},
    "status": "SUCCESSFUL",
    "startTime": "2022-04-05T14:15:30.839+00:00",
    "endTime": "2022-04-05T14:15:31.448+00:00",
    "metadata": {
        "createdDate": "2022-04-05T14:15:16.288+00:00",
        "createdByUserId": "e9f0d1f6-5df3-5bbc-bee2-a11b2359c815",
        "createdByUsername": "diku_admin",
        "updatedDate": "2022-04-05T14:15:31.523+00:00",
        "updatedByUserId": "e9f0d1f6-5df3-5bbc-bee2-a11b2359c815",
        "updatedByUsername": "diku_admin"
    },
    "identifierType": "BARCODE",
    "entityType": "ITEM",
    "progress": {
        "total": 2,
        "processed": 2,
        "progress": 100
    }
}

Check item location after update

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