Skip to content

[Bugfix:SubminiPolls] Multiple Poll Response Edits Not Saving#12351

Merged
bmcutler merged 1 commit intomainfrom
12281_Multiple_Poll_Responses_Fix
Jan 29, 2026
Merged

[Bugfix:SubminiPolls] Multiple Poll Response Edits Not Saving#12351
bmcutler merged 1 commit intomainfrom
12281_Multiple_Poll_Responses_Fix

Conversation

@John-Roy123
Copy link
Contributor

Why is this Change Important & Necessary?

Fixes #12281 -- When instructors tried to create more than 1 new response in a single edit for a Submini Poll, only the last response was saved and the rest were lost.

What is the New Behavior?

Each new response is now given a unique ID, preventing the previous behavior where every new response had the same ID, so the last created response overwrote all the prior responses.

What steps should a reviewer take to reproduce or test the bug or new feature?

  1. Log in as instructor
  2. Create a new SubminiPoll with at least 1 response
  3. Edit poll and add at least 2 new responses
  4. Save poll and check it again to see if all new responses saved

Automated Testing & Documentation

Cypress tests do not currently cover specifically adding multiple responses in a single edit

Other information

Change is a minor JavaScript change - no breaking changes were made

-Previously, every added response was assigned the same ID so the last created response would overwrite the ones created prior
- Added field in the form that counts how many responses were generated
-Using this value, each response is given a unique ID
@github-project-automation github-project-automation bot moved this to Seeking Reviewer in Submitty Development Jan 26, 2026
@John-Roy123 John-Roy123 changed the title [Bugfix:SubminiPolls] [Bugfix:SubminiPolls] Multiple Poll Response Edits Not Saving Jan 26, 2026
@codecov
Copy link

codecov bot commented Jan 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.67%. Comparing base (ea63f36) to head (570fc1f).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##               main   #12351   +/-   ##
=========================================
  Coverage     21.67%   21.67%           
  Complexity     9618     9618           
=========================================
  Files           268      268           
  Lines         36158    36158           
  Branches        486      486           
=========================================
  Hits           7837     7837           
  Misses        27839    27839           
  Partials        482      482           
Flag Coverage Δ
autograder 21.39% <ø> (ø)
js 2.04% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.69% <ø> (ø)
python_submitty_utils 80.08% <ø> (ø)
submitty_daemon_jobs 90.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@Rkoester47 Rkoester47 left a comment

Choose a reason for hiding this comment

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

I tested the changes from this branch and everything seems to be functioning as described by the PR. On main, only the last of multiple answers is added to an edited poll. On this branch, I was able to add as many answers as I wanted successfully. I tested on both a preexisting submini poll, as well as a branch new one created on this branch. Good work!

@github-project-automation github-project-automation bot moved this from Seeking Reviewer to Awaiting Maintainer Review in Submitty Development Jan 27, 2026
@John-Roy123 John-Roy123 requested a review from roye2 January 27, 2026 21:45
@automateprojectmangement automateprojectmangement bot moved this from Awaiting Maintainer Review to In Review in Submitty Development Jan 27, 2026
Copy link
Contributor

@roye2 roye2 left a comment

Choose a reason for hiding this comment

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

I looked at the code and thought it seemed well designed and easy to follow. I also tested the functionality and was able to reproduce the original issue on main, and observe the fix after these new changes.

@github-project-automation github-project-automation bot moved this from In Review to Awaiting Maintainer Review in Submitty Development Jan 27, 2026
@bmcutler bmcutler merged commit 7853e42 into main Jan 29, 2026
72 of 75 checks passed
@bmcutler bmcutler deleted the 12281_Multiple_Poll_Responses_Fix branch January 29, 2026 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Unable to add & save more than 1 new poll response

4 participants