Skip to content

Feature: atomic uploads of TEI and Events#383

Merged
MiquelAdell merged 3 commits intodevelopmentfrom
feature/atomic-tei-with-events
Dec 4, 2025
Merged

Feature: atomic uploads of TEI and Events#383
MiquelAdell merged 3 commits intodevelopmentfrom
feature/atomic-tei-with-events

Conversation

@gqcorneby
Copy link

@gqcorneby gqcorneby commented Dec 3, 2025

📌 References

📝 Implementation

  • update TEI payload to include events inside enrollments

🔥 Notes for the reviewer

🎨 Screenshots

Screenshots instead of screen record because importing takes too long
Import results - 3 TEIs and 3 events included instead of 2 separate reports
image

Import results - valid 3 valid TEI with invalid values in the events
image

📑 Others

@gqcorneby gqcorneby requested a review from MiquelAdell December 3, 2025 05:20
@bundlemon
Copy link

bundlemon bot commented Dec 3, 2025

BundleMon

No change in files bundle size

Groups updated (1)
Status Path Size Limits
Build Folder
./**/*
1.88MB (-72B 0%) +20%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@gqcorneby gqcorneby changed the title update tracker program saving to include events with TEIs Feature: atmoic uploads of TEI and Events Dec 3, 2025
@MiquelAdell MiquelAdell requested a review from tokland December 4, 2025 07:01
Copy link

@tokland tokland left a comment

Choose a reason for hiding this comment

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

Cool, sending events within the enrollments to get atomicity is perfectly fine (and typical, there was no technical reason not to do like this in the first place).

Just some minor comments:

existingTeis: TrackedEntityInstance[];
title: string;
importOptions: ImportDataPackageOptions;
events: Dictionary<Event[]>;
Copy link

@tokland tokland Dec 4, 2025

Choose a reason for hiding this comment

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

Using the Dictionary type has a problem: we don't know what the key is. This is sometimes clarified by the variable name (eventsBySomething), using a more verbose type Record<Something, Event[]> (where something is a type alias, to avoid keys like "string") or both.

@gqcorneby gqcorneby requested a review from tokland December 4, 2025 09:11
Copy link

@tokland tokland left a comment

Choose a reason for hiding this comment

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

Just a minor thing, approving

@tokland tokland changed the title Feature: atmoic uploads of TEI and Events Feature: atomic uploads of TEI and Events Dec 4, 2025
@MiquelAdell MiquelAdell merged commit 6b5b8ec into development Dec 4, 2025
6 checks passed
@MiquelAdell MiquelAdell deleted the feature/atomic-tei-with-events branch December 4, 2025 12:16
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.

3 participants