[Bugfix:SubminiPolls] Multiple Poll Response Edits Not Saving#12351
[Bugfix:SubminiPolls] Multiple Poll Response Edits Not Saving#12351
Conversation
-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
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Rkoester47
left a comment
There was a problem hiding this comment.
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!
roye2
left a comment
There was a problem hiding this comment.
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.
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?
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