Add order in not highlighted assemblies by weight#7444
Add order in not highlighted assemblies by weight#7444mrcasals merged 1 commit intodecidim:developfrom
Conversation
|
|
||
| def parent_assemblies | ||
| search.results.parent_assemblies.order(promoted: :desc) | ||
| search.results.parent_assemblies.order(weight: :asc) |
There was a problem hiding this comment.
This should fallback to the promoted, IMO
There was a problem hiding this comment.
Do you propose this?
search.results.parent_assemblies.order(promoted: :desc, weight: :asc)
There was a problem hiding this comment.
This would work, yes! Or the other way around, order(weight: :asc, promoted: :desc). Not sure what were the requirements or what's @decidim/product thoughts on this, you might need to ask.
You might need to modify code from the previous PR to keep the same feature, sorry about that!
There was a problem hiding this comment.
I think product gave the OK to first order them by weight and then as they were normally ordered if they have no weight.
What do you mean about modify code from the previous PR?
There was a problem hiding this comment.
What do you mean about modify code from the previous PR?
I mean that probably the same issue happens with the Participatory Processes!
There was a problem hiding this comment.
Participatory processes are different because in this section we show participatory processes and participatory processes group.
These processes groups have no weight so it could not be applied.
dec5864 to
93c734a
Compare
* develop: (232 commits) Add Votings to Open Data export (#7388) Add order in not highlighted assemblies by weight (#7444) Resort Menus (#7460) Polling Officer Zone (#7439) Fix session timeout when using multiple windows or tabs (#7459) Fix display of debates with multiple dates (#7393) chore: split election tests (#7451) style: make selected values primary labels with delete button (#7448) Fix and tests to avoid registered users being invited again (#7392) Migrate Admin menus to Menu Registry (#7368) New Crowdin updates (#7338) Bump to carrierwave 2.2.0 (#7441) Voting: show callout when Polling Stations miss Polling Officers (#7417) Further default orders for the API (#7436) Fix random order inconsistencies (#7437) Ensure Rails is locked to 5.2.4.x series (#7430) Add default order by ID to API list queries (#7424) Update dependencies (#7422) Ignore warning on CI when no artifacts to upload (#7420) Filter and search polling officers (#7411) ...
* develop: (25 commits) Add css selectors to emails to improve design customization (#7493) Only share tokens if component exists (#7499) Fix record encryptor hash values JSON parsing for legacy unencrypted hash values (#7494) Fix NULL error with weight field in assemblies & processes (#7486) Fix proposals to budget import (#7449) Fix cost display on proposals (#7450) Fix #7487 - Invalid signature on message decryption (#7488) New Crowdin updates (#7482) Move specs file to correct folder (#7476) Improve changelog generator (#7475) New Crowdin updates (#7472) Prepare 0.25-dev version (#7473) New Crowdin updates (#7470) New Crowdin updates (#7468) Feature proposal infinite edit time (#7406) New Crowdin updates (#7457) Trigger docs build on folder changes (#7360) Add changelog generator based on PR data (#7461) Add Votings to Open Data export (#7388) Add order in not highlighted assemblies by weight (#7444) ...
🎩 What? Why?
In the related PR, I forgot to order by weight also the assemblies that are not highlighted.
📌 Related Issues
Link your PR to an issue
Testing
Describe the best way to test or validate your PR.
📋 Checklist
🚨 Please review the guidelines for contributing to this repository.
docs/.📷 Screenshots
Please add screenshots of the changes you're proposing
