Conversation
a6f3443 to
69c1b84
Compare
|
psmagin
left a comment
There was a problem hiding this comment.
It was agreed that custom-field work will not be merged into the master until it is tested for performance.
@psmagin
|
Correct
Correct
Execution time, database load.
This should be defined by the PO, but it must definitely be fast enough not to affect other flows (such as data import, bulk update, etc.).
I would expect tests to run on a bugfest-like dataset with about 8M items. It’s possible that each item could reference the same custom field.
Yes. There are several performance tests for data import and bulk update. You could reach out to the PTF team, who usually measure performance, and ask for their assistance with this. |
69c1b84 to
d71fbeb
Compare
add missing permissions add customFields to item.json add RecordServiceFactory implementation add RecordService meta info add db indexes for custom fields
… to correct location
…ApiTest and move functions to the end
…bject and use constants for strings Remove JsonObject.mapFrom to reduce unnecessary calculations
Add comments explaining the test
… check statistics Add getCustomFieldStatisticCount to test statistiks
…, testPutCustomFieldCollection
… use the correct table
…ody of testPutCustomFieldCollection style: 🎨 Add whitespace
d71fbeb to
08689cd
Compare
JSON Schema Changes (
|
| Status | File (HEAD) |
|---|---|
| Added | ramls/schemas/common/custom_fields.json |
| Modified | ramls/schemas/item-storage/item.json |
Diffs (normalized first, fallback to raw if empty)
ramls/schemas/common/custom_fields.json
--- ramls/schemas/common/custom_fields.json (base)
+++ ramls/schemas/common/custom_fields.json (head)
@@ -0,0 +1,7 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "additionalProperties": true,
+ "description": "Object that contains custom field",
+ "javaName": "CustomFields",
+ "type": "object"
+}ramls/schemas/item-storage/item.json
--- ramls/schemas/item-storage/item.json (base)
+++ ramls/schemas/item-storage/item.json (head)
@@ -49,6 +49,11 @@
"description": "Copy number is the piece identifier. The copy number reflects if the library has a copy of a single-volume monograph; one copy of a multi-volume, (e.g. Copy 1, or C.7.)",
"type": "string"
},
+ "customFields": {
+ "$ref": "../common/custom_fields.json",
+ "description": "Object that contains custom fields",
+ "type": "object"
+ },
"descriptionOfPieces": {
"description": "Description of item pieces.",
"type": "string"
|



Purpose
Describe the purpose of this pull request. Why is this change necessary? What problem does it solve?
This pull request is for integrating the
folio-custom-fieldsbackend library into mod-inventory-storage, so that it supports storing custiom field values on inventory items.Approach
How does this change fulfill the purpose? Provide a high-level overview of the technical approach taken to address the problem.
We followed the guide in https://github.com/folio-org/folio-custom-fields for implementing the library and used the implementation in https://github.com/folio-org/mod-orders-storage as reference.
Changes Checklist
New API
GET, PUT, POST /custom-fields
GET, PUT, DELETE /custom-fields/{id}
GET /custom-fields/{id}/stats
GET /custom-fields/{id}/options/{optId}/stats
Permissions
inventory-storage.custom-fields.all
inventory-storage.custom-fields.collection.get
inventory-storage.custom-fields.collection.put
inventory-storage.custom-fields.item.post
inventory-storage.custom-fields.item.get
inventory-storage.custom-fields.item.put
inventory-storage.custom-fields.item.delete
inventory-storage.custom-fields.item.stats.get
inventory-storage.custom-fields.item.option.stats.get
Related Issues
List any Jira issues related to this pull request.
https://folio-org.atlassian.net/browse/MODINVSTOR-1446
https://folio-org.atlassian.net/browse/UXPROD-5370
Learning and Resources (if applicable)
Discuss any research conducted during the development of this pull request. Include links to relevant blog posts, patterns, libraries, or addons that were used to solve the problem.
https://github.com/folio-org/folio-custom-fields
https://github.com/folio-org/mod-orders-storage
https://www.baeldung.com/java-passing-method-parameter
Screenshots (if applicable)
If this pull request involves any visual changes or new features, consider including screenshots or GIFs to illustrate the changes.