Skip to content

ILLDEV-583 Pass empty string instead of n/a to templates - #891

Merged
skomorokh merged 3 commits into
mainfrom
pull-slip-blank
Nov 27, 2026
Merged

skomorokh merged 3 commits into
mainfrom
pull-slip-blank

Conversation

@skomorokh

Copy link
Copy Markdown
Contributor

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

This way the template can more readily determine its own placeholder or
if it wants to display the field at all.
Copilot AI balanced review requested due to automatic review settings November 24, 2026 23:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

Comment thread broker/email/email.go Resolved
@skomorokh
skomorokh merged commit 7a64e88 into main Nov 27, 2026
7 checks passed
@skomorokh
skomorokh deleted the pull-slip-blank branch November 27, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants