Skip to content

#5760 - Fixes View/Edit Online/Blended offering from bulk upload#5929

Merged
tiago-graf merged 5 commits intomainfrom
bug/#5760-bulk-upload-wil-type
Mar 24, 2026
Merged

#5760 - Fixes View/Edit Online/Blended offering from bulk upload#5929
tiago-graf merged 5 commits intomainfrom
bug/#5760-bulk-upload-wil-type

Conversation

@tiago-graf
Copy link
Copy Markdown
Collaborator

Summary

Fixes the offering form for bulk upload items.
Root cause is that form.io radio components will crash when receiving null values, the fix applied converts null values to undefined.

@tiago-graf tiago-graf added Form.io Form IO definitions changed. Backend Used by the dependabot pull requests to identify PRs related to the backend. labels Mar 19, 2026
@tiago-graf tiago-graf self-assigned this Mar 19, 2026
@tiago-graf tiago-graf marked this pull request as ready for review March 19, 2026 23:11
Copilot AI review requested due to automatic review settings March 19, 2026 23:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Education Program Offering API response to avoid returning null for radio-field values that can cause Form.io submissions (used by bulk upload offering forms) to crash.

Changes:

  • Convert onlineInstructionMode and isOnlineDurationSameAlways from null to undefined so they are omitted from JSON responses when not set.
  • Add inline documentation explaining why null must be avoided for these radio fields.
  • Minor import reordering.

@dheepak-aot
Copy link
Copy Markdown
Collaborator

Nice work. 2 minor comments.

@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 20.12% ( 4577 / 22749 )
Methods: 9.47% ( 262 / 2767 )
Lines: 24.49% ( 3929 / 16044 )
Branches: 9.8% ( 386 / 3938 )

@github-actions
Copy link
Copy Markdown

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 48.26% ( 2712 / 5619 )
Methods: 38.26% ( 285 / 745 )
Lines: 55.13% ( 2049 / 3717 )
Branches: 32.67% ( 378 / 1157 )

@github-actions
Copy link
Copy Markdown

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 79.33% ( 9155 / 11541 )
Methods: 78.47% ( 1181 / 1505 )
Lines: 82.65% ( 6881 / 8325 )
Branches: 63.88% ( 1093 / 1711 )

Copy link
Copy Markdown
Collaborator

@dheepak-aot dheepak-aot left a comment

Choose a reason for hiding this comment

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

Thanks for the changes and E2E test. Looks good.

@github-actions
Copy link
Copy Markdown

E2E SIMS API Coverage Report

Totals Coverage
Statements: 65.57% ( 12999 / 19826 )
Methods: 62.33% ( 1527 / 2450 )
Lines: 69.15% ( 9431 / 13639 )
Branches: 54.62% ( 2041 / 3737 )

Comment on lines +410 to +413
// Null and empty strings are converted to undefined so these fields are
// absent from the JSON response when not set.
// Form.io radio components crash when the
// submission data contains null for a radio field value.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍

Copy link
Copy Markdown
Collaborator

@sh16011993 sh16011993 left a comment

Choose a reason for hiding this comment

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

Nice work @tiago-graf 👍

@tiago-graf tiago-graf added this pull request to the merge queue Mar 24, 2026
Merged via the queue into main with commit 6e21afc Mar 24, 2026
26 of 27 checks passed
@tiago-graf tiago-graf deleted the bug/#5760-bulk-upload-wil-type branch March 24, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backend Used by the dependabot pull requests to identify PRs related to the backend. Form.io Form IO definitions changed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants