Standardize child passenger indicator to isChild#685
Draft
Conversation
Co-authored-by: Smotrov <7815789+Smotrov@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix inconsistent child indication in passenger booking
Standardize child passenger indicator to Mar 12, 2026
isChild
|
There was a problem hiding this comment.
Pull request overview
This PR standardizes the Air passenger “child” indicator to a single boolean property name (isChild) across the search/price request-building path and the booking path, removing the prior inconsistency (child vs isChild) that could lead to mismatched template behavior.
Changes:
- Updated
convert-passengers-object-to-arraytransformer to emitisChildinstead ofchild. - Updated Air request Handlebars templates to check
{{#if isChild}}instead of{{#if child}}. - Updated the transformer unit test assertions to align with the new property name.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/Air/transformers/convert-passengers-object-to-array.test.js | Aligns test expectations with the standardized isChild flag. |
| src/Services/Air/transformers/convert-passengers-object-to-array.js | Emits isChild for CNN passengers to standardize the passenger model. |
| src/Services/Air/templates/AIR_PRICE_REQ.handlebars.js | Uses isChild for child-age conditional rendering in pricing requests. |
| src/Services/Air/templates/AIR_LOW_FARE_SEARCH_REQUEST.handlebars.js | Uses isChild for child-age conditional rendering in low-fare search requests. |
| src/Services/Air/templates/AIR_AVAILABILTIY_REQUEST.handlebars.js | Uses isChild for child-age conditional rendering in availability requests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.



Two different property names were used interchangeably to flag a child passenger —
child(marked// quickfix) in the search/price path andisChildin the booking path — making the data model inconsistent and error-prone.Changes
convert-passengers-object-to-array.js— renamechild→isChild, drop the// quickfixcommentAIR_AVAILABILTIY_REQUEST,AIR_LOW_FARE_SEARCH_REQUEST,AIR_PRICE_REQ) — update conditionals from{{#if child}}→{{#if isChild}}convert-passengers-object-to-array.test.js— update assertions to matchBefore:
After:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.