Skip to content

Feature/custom field select mapping - #102

Merged
btravisebsco merged 3 commits into
mainfrom
feature/custom-field-select-mapping
Sep 18, 2026
Merged

btravisebsco merged 3 commits into
mainfrom
feature/custom-field-select-mapping

Conversation

@btravisebsco

Copy link
Copy Markdown
Contributor

Add support for mapping mapping select custom fields from friendly values in UserImporter, and bump version for release.

Resolve labels to FOLIO option ids for single-select, multi-select, and
radio-button custom fields on user import, falling back to raw option
ids and degrading gracefully if the custom-fields definitions can't be
fetched. Also converts several UserImporter methods that had no actual
async work to plain sync defs, per SonarQube's unnecessary-async flags.
UserImporter.build_custom_field_option_maps used to hit /custom-fields
via a hand-rolled pagination loop against folio_client.httpx_client
directly, which could raise "Cannot send a request, as the client has
been closed." if an earlier folio_get_all call left the shared client
closed. Delegate to folioclient's own folio_get_all (>=1.0.13), which
now accepts a headers kwarg and already handles session self-healing
and pagination, removing the need for our own reimplementation.

Add a live-environment integration test (tests/test_user_import_integration.py,
gated behind the `integration` marker and FOLIO_* env vars) that provisions a
real select-type custom field definition and validates label resolution and
user creation end-to-end against a live FOLIO snapshot tenant.
@btravisebsco
btravisebsco merged commit b4ad958 into main Sep 18, 2026
5 checks passed
@btravisebsco
btravisebsco deleted the feature/custom-field-select-mapping branch September 18, 2026 21:27
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.

2 participants