Repository navigation
ILLDEV-583 Pass empty string instead of n/a to templates - #891
Merged
Merged
Conversation
This way the template can more readily determine its own placeholder or if it wants to display the field at all.
skomorokh
requested review from
JanisSaldabols,
adamdickmeiss and
jakub-id
as code owners
November 24, 2026 23:17
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Existing title comparisons can misroute missing-title branches and block notifications, while empty barcode sample data causes validation to reject previously valid pull-slip templates.
2 open issues
What changed in this PR
This PR changes missing values in CrossLink’s email and pull-slip template data from "n/a" to empty strings, allowing templates to choose placeholders or omit fields.
Changes:
- Removes default sentinel values from request and item template fields.
- Updates exported conditionals and validation data for empty-value handling.
- Adjusts tests and migration documentation to match the new behavior.
Validation was limited to code inspection; tests were not run.
| File | Description |
|---|---|
migration/scripts.md |
Documents empty-value behavior in converted conditionals. |
migration/export-crosslink-config.sql |
Converts conditions to direct field checks and updates accepted syntax. |
broker/pullslip/service/pdf_test.go |
Updates sparse pull-slip expectations. |
broker/patron_request/service/template.go |
Uses empty optional fields in validation data. |
broker/patron_request/service/template_test.go |
Tests validation with empty fields and populated request IDs. |
broker/patron_request/service/action.go |
Passes empty barcode data to email templates. |
broker/patron_request/api/api-handler_test.go |
Updates preview conditionals and error positions. |
broker/email/email.go |
Leaves missing template values empty instead of using "n/a". |
broker/email/email_test.go |
Updates assertions for missing-field behavior. |
Review effort: Balanced
jakub-id
approved these changes
Nov 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


This way the template can more readily determine its own placeholder or if it wants to display the field at all.