Skip to content

Commit

Permalink
Merge pull request #488 from folio-org/MODFQMMGR-530
Browse files Browse the repository at this point in the history
MODFQMMGR-530:Entity adjustments: simple items 2 entity adjustments
  • Loading branch information
kjain110 authored Oct 17, 2024
2 parents f8a05d9 + 713d8dc commit 386f93f
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 40 deletions.
84 changes: 48 additions & 36 deletions src/main/resources/entity-types/inventory/simple_item_details.json5
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
isIdColumn: true,
queryable: true,
visibleByDefault: false,
essential: true,
hidden: true,
valueGetter: ':sourceAlias.id',
},
{
Expand All @@ -40,6 +42,7 @@
{
name: 'notes',
sourceAlias: 'item',
essential: true,
dataType: {
dataType: 'arrayType',
itemDataType: {
Expand Down Expand Up @@ -77,17 +80,17 @@
filterValueGetter: "( SELECT array_agg(lower(elems.value->>'staffOnly')) FROM jsonb_array_elements(:sourceAlias.jsonb->'notes') AS elems)",
valueFunction: 'lower(:value)',
},
{
name: 'item_note_type_id',
property: 'itemNoteTypeId',
dataType: {
dataType: 'stringType',
},
queryable: false,
valueGetter: "( SELECT array_agg(elems.value->>'itemNoteTypeId') FROM jsonb_array_elements(:sourceAlias.jsonb->'notes') AS elems)",
filterValueGetter: "( SELECT array_agg(lower(elems.value->>'itemNoteTypeId')) FROM jsonb_array_elements(:sourceAlias.jsonb->'notes') AS elems)",
valueFunction: 'lower(:value)',
},
// {
// name: 'item_note_type_id',
// property: 'itemNoteTypeId',
// dataType: {
// dataType: 'stringType',
// },
// queryable: false,
// valueGetter: "( SELECT array_agg(elems.value->>'itemNoteTypeId') FROM jsonb_array_elements(:sourceAlias.jsonb->'notes') AS elems)",
// filterValueGetter: "( SELECT array_agg(lower(elems.value->>'itemNoteTypeId')) FROM jsonb_array_elements(:sourceAlias.jsonb->'notes') AS elems)",
// valueFunction: 'lower(:value)',
// },
],
},
},
Expand Down Expand Up @@ -115,7 +118,8 @@
},
isIdColumn: false,
queryable: true,
visibleByDefault: false,
essential: true,
visibleByDefault: true,
valueGetter: ":sourceAlias.jsonb->'status'->>'name'",
filterValueGetter: "\"left\"(lower(${tenant_id}_mod_inventory_storage.f_unaccent((:sourceAlias.jsonb -> 'status'::text) ->> 'name'::text)), 600)",
valueFunction: '"left"(lower(${tenant_id}_mod_inventory_storage.f_unaccent(:value)), 600)',
Expand Down Expand Up @@ -229,6 +233,7 @@
isIdColumn: false,
queryable: true,
visibleByDefault: false,
essential: true,
valueGetter: "(:sourceAlias.jsonb->>'_version')::integer",
valueFunction: '(:value)::integer',
},
Expand All @@ -252,12 +257,14 @@
},
isIdColumn: false,
queryable: true,
visibleByDefault: false,
visibleByDefault: true,
essential: true,
valueGetter: ":sourceAlias.jsonb->'metadata'->>'updatedDate'",
},
{
name: 'updated_by_user_id',
sourceAlias: 'item',
hidden: true,
dataType: {
dataType: 'rangedUUIDType',
},
Expand Down Expand Up @@ -349,6 +356,8 @@
isIdColumn: false,
queryable: true,
visibleByDefault: false,
essential: true,
hidden: true,
valueGetter: ":sourceAlias.materialtypeid",
},
{
Expand Down Expand Up @@ -540,6 +549,8 @@
isIdColumn: false,
queryable: true,
visibleByDefault: false,
essential: true,
hidden: true,
valueGetter: ":sourceAlias.holdingsrecordid",
},
{
Expand All @@ -552,6 +563,8 @@
},
},
isIdColumn: false,
essential: true,
hidden: true,
queryable: true,
visibleByDefault: false,
valueGetter: "(\
Expand Down Expand Up @@ -637,6 +650,8 @@
isIdColumn: false,
queryable: true,
visibleByDefault: false,
essential: true,
hidden: true,
valueGetter: ":sourceAlias.jsonb->>'permanentLoanTypeId'",
},
{
Expand All @@ -648,6 +663,8 @@
isIdColumn: false,
queryable: true,
visibleByDefault: false,
essential: true,
hidden: true,
valueGetter: ":sourceAlias.jsonb->>'itemLevelCallNumberTypeId'",
},
{
Expand Down Expand Up @@ -736,7 +753,8 @@
},
isIdColumn: false,
queryable: true,
visibleByDefault: false,
visibleByDefault: true,
essential: true,
valueGetter: ":sourceAlias.jsonb->>'itemLevelCallNumber'",
},
{
Expand All @@ -748,6 +766,8 @@
isIdColumn: false,
queryable: true,
visibleByDefault: false,
essential: true,
hidden: true,
valueGetter: ":sourceAlias.jsonb->>'temporaryLoanTypeId'"
},
{
Expand All @@ -759,6 +779,8 @@
isIdColumn: false,
queryable: true,
visibleByDefault: false,
essential: true,
hidden: true,
valueGetter: ":sourceAlias.permanentlocationid",
},
{
Expand All @@ -770,6 +792,7 @@
isIdColumn: false,
queryable: true,
visibleByDefault: false,
essential: true,
valueGetter: ":sourceAlias.jsonb->'lastCheckIn'->>'dateTime'",
},
{
Expand All @@ -781,6 +804,8 @@
isIdColumn: false,
queryable: true,
visibleByDefault: false,
hidden: true,
essential: true,
valueGetter: ":sourceAlias.jsonb->'lastCheckIn'->>'staffMemberId'",
},
{
Expand All @@ -792,6 +817,8 @@
isIdColumn: false,
queryable: true,
visibleByDefault: false,
essential: true,
hidden: true,
valueGetter: ":sourceAlias.jsonb->'lastCheckIn'->>'servicePointId'",
},
{
Expand All @@ -803,19 +830,9 @@
isIdColumn: false,
queryable: true,
visibleByDefault: false,
hidden: true,
valueGetter: ":sourceAlias.jsonb->>'inTransitDestinationServicePointId'",
},
{
name: 'item_level_call_number_prefix',
sourceAlias: 'item',
dataType: {
dataType: 'stringType',
},
isIdColumn: false,
queryable: true,
visibleByDefault: false,
valueGetter: ":sourceAlias.jsonb->>'itemLevelCallNumberPrefix'",
},
{
name: 'number_of_pieces',
sourceAlias: 'item',
Expand All @@ -842,6 +859,7 @@
{
name: 'tags_tag_list',
sourceAlias: 'item',
essential: true,
dataType: {
dataType: 'arrayType',
itemDataType: {
Expand All @@ -864,17 +882,6 @@
jsonb_array_elements(:sourceAlias.jsonb->'tags'->'tagList') AS elems\
)",
},
{
name: 'item_level_call_number_suffix',
sourceAlias: 'item',
dataType: {
dataType: 'stringType',
},
isIdColumn: false,
queryable: true,
visibleByDefault: false,
valueGetter: ":sourceAlias.jsonb->>'itemLevelCallNumberSuffix'",
},
{
name: 'chronology',
sourceAlias: 'item',
Expand Down Expand Up @@ -930,6 +937,7 @@
isIdColumn: false,
queryable: true,
visibleByDefault: false,
hidden: true,
valueGetter: ":sourceAlias.jsonb->>'temporaryLocationId'",
},
{
Expand All @@ -941,6 +949,7 @@
isIdColumn: false,
queryable: true,
visibleByDefault: false,
hidden: true,
valueGetter: ":sourceAlias.jsonb->>'itemDamagedStatusId'",
},
{
Expand All @@ -952,6 +961,7 @@
isIdColumn: false,
queryable: true,
visibleByDefault: false,
essential: true,
valueGetter: ":sourceAlias.jsonb->>'numberOfMissingPieces'",
},
{
Expand All @@ -963,6 +973,7 @@
isIdColumn: false,
queryable: true,
visibleByDefault: false,
essential: true,
valueGetter: ":sourceAlias.jsonb->>'purchaseOrderLineIdentifier'",
},
{
Expand Down Expand Up @@ -992,6 +1003,7 @@
isIdColumn: false,
queryable: false,
hidden: true,
essential: true,
visibleByDefault: false,
valueGetter: ":sourceAlias.jsonb::text",
}
Expand Down
4 changes: 2 additions & 2 deletions translations/mod-fqm-manager/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -807,10 +807,10 @@
"entityType.simple_item_details.id": "Item UUID",
"entityType.simple_item_details.in_transit_destination_service_point_id": "In transit destination service point UUID",
"entityType.simple_item_details.item_damaged_status_id": "Item damaged status UUID",
"entityType.simple_item_details.item_level_call_number": "Item level call number",
"entityType.simple_item_details.item_level_call_number": "Item call number",
"entityType.simple_item_details.item_level_call_number_prefix": "Item level call number prefix",
"entityType.simple_item_details.item_level_call_number_suffix": "Item level call number suffix",
"entityType.simple_item_details.item_level_call_number_type_id": "Item level call number type UUID",
"entityType.simple_item_details.item_level_call_number_type_id": "Item call number type UUID",
"entityType.simple_item_details.jsonb": "JSONB",
"entityType.simple_item_details.last_check_in_date_time": "Last check in date time",
"entityType.simple_item_details.last_check_in_service_point_id": "Last check in service point UUID",
Expand Down
4 changes: 2 additions & 2 deletions translations/mod-fqm-manager/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -460,10 +460,10 @@
"entityType.simple_item_details.id": "Item UUID",
"entityType.simple_item_details.in_transit_destination_service_point_id": "In transit destination service point UUID",
"entityType.simple_item_details.item_damaged_status_id": "Item damaged status UUID",
"entityType.simple_item_details.item_level_call_number": "Item level call number",
"entityType.simple_item_details.item_level_call_number": "Item call number",
"entityType.simple_item_details.item_level_call_number_prefix": "Item level call number prefix",
"entityType.simple_item_details.item_level_call_number_suffix": "Item level call number suffix",
"entityType.simple_item_details.item_level_call_number_type_id": "Item level call number type UUID",
"entityType.simple_item_details.item_level_call_number_type_id": "Item call number type UUID",
"entityType.simple_item_details.last_check_in_date_time": "Last check in date time",
"entityType.simple_item_details.last_check_in_service_point_id": "Last check in service point UUID",
"entityType.simple_item_details.last_check_in_staff_member_id": "Last check in staff member UUID",
Expand Down

0 comments on commit 386f93f

Please sign in to comment.