[FOLIO-2342] POST to Inventory/instances does not honor supplied HRID Created: 05/Nov/19  Updated: 15/Sep/20  Resolved: 05/Nov/19

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Bug Priority: TBD
Reporter: Theodor Tolstoy (One-Group.se) Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Cloners
clones CHAL-132 POST to Inventory/instances does not ... Closed
Sprint:
Development Team: Prokopovych

 Description   

Steps to reproduce:
(reproduced in Snapshot stable)
1. POST the following json to Inventory/instances:

{
 "id":"db567e40-1423-41f9-bcfe-3002b1d9e948",
  "hrid": "myHRID4",
  "source": "MARC",
  "title": "krabbapappa",
  "alternativeTitles": [],
  "editions": [],
  "series": [],
  "identifiers": [],
  "contributors": [
    {
      "name": "Augustin, Harald",
      "contributorNameTypeId": "2b94c631-fca9-4892-a730-03ee529ffe2a"
    },
    {
      "name": "Shaker Verlag GmbH",
      "contributorNameTypeId": "2e48e713-17f3-4c13-a9f8-23845bb210aa"
    }
  ],
  "subjects": [],
  "classifications": [],
  "publication": [
    {
      "publisher": "Shaker Verlag",
      "place": "Aachen",
      "dateOfPublication": "2017"
    }
  ],
  "publicationFrequency": [],
  "publicationRange": [],
  "electronicAccess": [],
  "instanceTypeId": "6312d172-f0cf-40f6-b27d-9fa8feaf332f",
  "instanceFormatIds": [],
  "physicalDescriptions": [],
  "languages": [
    "ger"
  ],
  "notes": [],
  "statisticalCodeIds": [],
  "metadata": {
    "createdDate": "2019-11-05T11:36:56.855+0000",
    "createdByUserId": "e0aafae2-e564-5d22-9653-bb08746eda9d",
    "updatedDate": "2019-11-05T11:36:56.855+0000",
    "updatedByUserId": "e0aafae2-e564-5d22-9653-bb08746eda9d"
  },
  "holdingsRecords2": []
}

2. Make a GET request to inventory/instances/db567e40-1423-41f9-bcfe-3002b1d9e948.
3. Compare the returned record with the above.
Expected behaviour:
The HRID is the same as the posted one.
Actual results:
FOLIO is generating a new HRID.

Additional information:
PUT works as expected


Generated at Thu Feb 08 23:19:57 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.