Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes issue with not being able to order dropdowns in extra questions #3566

Merged
merged 1 commit into from Aug 17, 2021

Conversation

MorayMySoc
Copy link
Contributor

@MorayMySoc MorayMySoc commented Aug 13, 2021

Ordering of dropdown list options is now sorted numerically on the index position. This means the order will be that expected by the user when creating the options.

https://github.com/mysociety/societyworks/issues/2511

@MorayMySoc MorayMySoc requested a review from dracos August 13, 2021 09:41
@codecov
Copy link

codecov bot commented Aug 13, 2021

Codecov Report

Merging #3566 (6ccfa71) into master (32b4845) will decrease coverage by 2.32%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3566      +/-   ##
==========================================
- Coverage   84.91%   82.59%   -2.33%     
==========================================
  Files         292      343      +51     
  Lines       18838    23205    +4367     
  Branches     3532     3543      +11     
==========================================
+ Hits        15997    19167    +3170     
- Misses       1721     2922    +1201     
+ Partials     1120     1116       -4     
Impacted Files Coverage Δ
perllib/FixMyStreet/App/Controller/Admin.pm 76.95% <100.00%> (ø)
web/js/lazyload.js 90.90% <0.00%> (ø)
web/cobrands/bromley/a-z-nav.js 50.00% <0.00%> (ø)
web/js/geolocation.js 32.14% <0.00%> (ø)
web/cobrands/fixmystreet/admin.js 18.10% <0.00%> (ø)
web/cobrands/buckinghamshire/assets.js 80.88% <0.00%> (ø)
web/cobrands/highways/assets.js 88.67% <0.00%> (ø)
...ixmystreet-uk-councils/council_validation_rules.js 100.00% <0.00%> (ø)
web/js/validation_rules.js 100.00% <0.00%> (ø)
web/cobrands/cheshireeast/assets.js 87.50% <0.00%> (ø)
... and 44 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 32b4845...6ccfa71. Read the comment docs.

Copy link
Member

@dracos dracos left a comment

Choose a reason for hiding this comment

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

I think this needs to be done a different way, I'm afraid!

perllib/FixMyStreet/App/Controller/Admin.pm Outdated Show resolved Hide resolved
Copy link
Member

@dracos dracos left a comment

Choose a reason for hiding this comment

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

Code change looks good, test looks good, thanks, only issue is the ID referenced in the changelog :)

CHANGELOG.md Outdated Show resolved Hide resolved
Raised by Peterborough but an FMS issue as, when creating dropdowns for extra questions on categories,
the dropdown options are sorted on index number, but this has not been a numeric sort so looks
random to the user.

The order of dropdown items now remains in the order they are in the creation/editing screen.

Adds a regression test.

mysociety/societyworks#2511
@mysociety-pusher mysociety-pusher merged commit 0754f8e into master Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants