feat: include detailed shipment and instrument data from questionary#1330
Merged
yoganandaness merged 5 commits intodevelopfrom Feb 4, 2026
Merged
Conversation
…in the EAM asset creation payload.
…in the EAM asset creation payload.
jekabs-karklins
approved these changes
Feb 3, 2026
Contributor
jekabs-karklins
left a comment
There was a problem hiding this comment.
Looks very good 👍🏻
09ffc0d to
b20ebe6
Compare
| sample_id: sampleId, | ||
| })) | ||
| ); | ||
| if (sampleIds.length > 0) { |
Contributor
There was a problem hiding this comment.
Just a small thing: it looks like the mutation would prevent an empty list, so is this check redundant? Or if it is still needed, should there be an earlier return from this function so that data isn't deleted from shipments_has_samples first?
Contributor
Author
There was a problem hiding this comment.
@simonfernandes Valuable point that. It is absolutely redundant and does not make sense to have a business check in the datasource layer. I have removed that and now the check only stays in the business layer(Mutation).
simonfernandes
approved these changes
Feb 4, 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.
Description
This pull request significantly enhances the process of creating asset equipment containers for EAM by extracting and including detailed shipment, sender, and instrument information in the request payload. It introduces a helper function to fetch answers from questionaries, expands the data sent to EAM, and adds a comprehensive test for the request payload structure.
Motivation and Context
Feature Expansion & Data Collection
How Has This Been Tested
Added a new test (
AddAssetEquipment.spec.ts) to verify that the generated payload includes all required fields and matches the expected structure, improving confidence in the integration.…in the EAM asset creation payload.Fixes
Changes
Feature Expansion & Data Collection:
getAnswerhelper function to retrieve specific answers from questionaries, supporting different data types and handling optional/required fields. This enables dynamic extraction of shipment and sender details.createContainerto collect additional data (weight, dimensions, dangerous goods details, sender information, parcel value, associated instruments, etc.) from the shipment's questionary and the instrument data source. [1] [2]Request Payload & Integration:
getAddAssetEquipmentRequestPayloadto accept and include the new fields, mapping them to the appropriate EAM custom fields (USERDEFINEDAREA.CUSTOMFIELD). This ensures all relevant shipment and sender data are transmitted to EAM. [1] [2]Depends on
Tests included/Docs Updated?