Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream FOLIO functions remove all natively created notes #1019

Merged
merged 1 commit into from
Jul 26, 2023

Conversation

cbeer
Copy link
Member

@cbeer cbeer commented Jul 26, 2023

The upstream functions suppress notes that aren't explicitly set to staffOnly=false, e.g.:

SELECT jsonb_agg(DISTINCT e)
FROM ( SELECT e - 'holdingsNoteTypeId' - 'staffOnly' ||
              jsonb_build_object('holdingsNoteTypeName', ( SELECT jsonb ->> 'name'
                                   FROM holdings_note_type
                                   WHERE id = nullif(e ->> 'holdingsNoteTypeId','')::uuid )) e
       FROM jsonb_array_elements( $1 ) AS e
	   WHERE NOT (e ->> 'staffOnly')::bool ) e1

Turns out, notes created in FOLIO don't set staffOnly for public notes.

fixes #1018

@jcoyne jcoyne merged commit 8f1e83d into main Jul 26, 2023
2 checks passed
@jcoyne jcoyne deleted the 1018-missing-notes branch July 26, 2023 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FOLIO-native item notes are not being indexed
2 participants