Merged
Conversation
…or sorting and matrix_single questions
alecslupu
added a commit
that referenced
this pull request
Jan 30, 2025
This reverts commit 570dd9e.
entantoencuanto
added a commit
that referenced
this pull request
Jan 30, 2025
* feature/ephemeral_to_regular_users: Add integration test of ephemeral user authorization transfer Update test Make transferrable authorization when duplicate user is ephemeral Revert "Fix answer choices default order" (#13975) Fix DownloadYourData core pipeline failures (#13970) Update DownloadYourData exports for `decidim-proposals` (#13958) Update DownloadYourData exports for `decidim-initiatives` (#13961) Fix answer choices default order (#13955) Fix 'Conference media link creation form has wrong title' (#13946) Add etiquette validator to Debates and Meetings (#13274) Enable users to edit their survey answers (#13800) Fix "Missing padding-top on proposals page" (#13945)
antopalidi
pushed a commit
to openpoke/decidim
that referenced
this pull request
Feb 12, 2025
andreslucena
pushed a commit
that referenced
this pull request
Mar 3, 2025
Member
|
Adding the |
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.
🎩 What? Why?
When application serializes answers to questions of sorting or matrix types there is not a default order defined and the database may return records with ids in reverse order causing misinterpretation of the results. This PR:
Decidim::Forms::AnswerChoicemodel, in ascending order first by position, then by position of matrix_row if any (used on matrix_single and matrix_multiple questions) and finally by id.Testing
Usually the database returns answer choices ordered by id and then errors do not occur. Try this with a database that does the opposite
📷 Screenshots