Consortia | Another tenant name is displayed in "Held by" facet when location from current tenant is selected

Description

Overview:  Another tenant name is displayed in "Held by" facet when location from current tenant is selected in "Effective location (item) facet"

Preconditions: 
1) Shared "Instance" record exists (ex.: "C404367 Instance 1 Folio Shared")
2) "Holdings" record with filled call number (ex.: "C404367 cn 1 M1 Shared IF") and created "Item" record exists in Member 1 (ex.: "College")
3) "Holdings" record with filled call number (ex.: "C404367 cn 2 M2 Shared IF") and created "Item" record exists in Member 2 (ex.: "University")
Steps to Reproduce:
Case 1: User sees another tenant name ("University") and records counter in "Held by" facet when "local" location for current tenant ("College") is selected in "Effective location (item) facet".

  1. Log into Member 1 (ex. "College") tenant of Consortium FOLIO environment as Admin. 

  2. Go to "Inventory" app >> "Browse"

  3. Select appropriate browse option, ex.: "Call number (all)"

  4. Browse for created call numbers from preconditions, ex.: "C404367 cn 1 M1 Shared IF".

  5. Expand "Held by" accordion.

  6. Select Location (for which "Holdings" on current member was created, see 2nd point in precondition) in "Effective location (item)" facet, ex. "Valery_college".

Expected Results: Only current Member tenant name (ex. "College") is displayed under expanded "Held by" accordion
Actual Results: Current Member tenant name (ex. "College") and another Member tenant name (ex. "University") are displayed under expanded "Held by" accordion.
See attached screenshots:

Case 2: User sees "local" location for current tenant ("College") in "Effective location (item) facet" when another tenant name ("University") is selected in "Held by" facet

  1. Log into Member 1 (ex. "College") tenant of Consortium FOLIO environment as Admin. 

  2. Go to "Inventory" app >> "Browse"

  3. Select appropriate browse option, ex.: "Call number (all)"

  4. Browse for created call numbers from preconditions, ex.: "C404367 cn 1 M1 Shared IF".

  5. Expand "Held by" accordion.

  6. Expand "Effective location (item)" accordion.

  7. Select another (different from current) Member tenant name, ex.: "University" in "Held by" facet.

Expected Results: There are no displayed "Locations" under expanded "Effective location (item)" accordion.
Actual Results: "Location" for current Member tenant (ex. "College") is displayed under expanded "Effective location (item)" accordion.

See attached screenshot:

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Attachments

4
  • 21 Nov 2023, 12:44 PM
  • 26 Oct 2023, 04:03 PM
  • 26 Oct 2023, 04:03 PM
  • 26 Oct 2023, 04:03 PM

Checklist

hide

TestRail: Results

Activity

Show:

Viacheslav KolesnykDecember 21, 2023 at 11:23 AM
Edited

When we send query for facets with filters - filters only apply to documents (instances) and facets are built on an instance result set. There's no way to filter out instance fileds (items/holdings) in elasticsearch so if there're multiple items/holdings - facets will be built for all of them.

We cannot currently fix current behaviour because if there's and instance with holdings/items in different tenants - they'll all count for facets.

Could be solved by using "nested objects" data structure for items/holdings as there will be a possibility to filter sub-resources(items/holdings) and build aggregations directly on them. "nested" data type has it's drawbacks and was investigated some time ago by Kalibek for some other purpose so we may implement it later.

Aggregations on nested fields: Elasticsearch docs

Valery_PilkoNovember 21, 2023 at 12:44 PM

Hi  
Re-tested on https://folio-dev-spitfire-consortium.ci.folio.org/ - issue (both cases) still reproduces.
See screencast:

Viacheslav KolesnykOctober 26, 2023 at 4:41 PM

Todo: don't cleanup query filters for tenantId/location facets in FacetCervice->cleanUpFacetSearchSource

Won't Do

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Spitfire

Fix versions

Release

Quesnelia (R1 2024)

RCA Group

Implementation coding issue

Affected releases

Poppy (R2 2023)

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created October 26, 2023 at 4:31 PM
Updated May 21, 2024 at 8:25 PM
Resolved December 22, 2023 at 3:15 PM
TestRail: Cases
TestRail: Runs

Flag notifications