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

fix using multiple disable messages on category questions #3186

Merged
merged 1 commit into from Sep 25, 2020

Conversation

struan
Copy link
Member

@struan struan commented Sep 18, 2020

Provide a stopper per disable message, rather than per question

Fixes https://github.com/mysociety/fixmystreet-commercial/issues/1997

@codecov
Copy link

codecov bot commented Sep 18, 2020

Codecov Report

Merging #3186 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3186   +/-   ##
=======================================
  Coverage   83.65%   83.66%           
=======================================
  Files         251      251           
  Lines       15742    15744    +2     
  Branches     2943     2942    -1     
=======================================
+ Hits        13169    13172    +3     
  Misses       1639     1639           
+ Partials      934      933    -1     
Impacted Files Coverage Δ
perllib/FixMyStreet/App/Controller/Report/New.pm 90.68% <100.00%> (+0.14%) ⬆️

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 193ff9c...75c205f. Read the comment docs.

@struan struan force-pushed the issues/commercial/1997-incorrect-disabled-messages branch from 06581c4 to 75c205f Compare September 21, 2020 14:12
@struan struan marked this pull request as ready for review September 21, 2020 14:13
@struan struan requested a review from dracos September 21, 2020 14:13
$category{$message} ||= {};
$category{$message}->{message} = $message;
$category{$message}->{code} = $_->{code};
push @{$category{$message}->{answers}}, $opt->{key};
Copy link
Member

Choose a reason for hiding this comment

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

Took me a little while, but I see how this works now, nice.

Provide a stopper per disable message, rather than per question.
Previously there was one stopper per dropdown so only the last message
encountered was used.
@struan struan force-pushed the issues/commercial/1997-incorrect-disabled-messages branch from 75c205f to 6aece0d Compare September 25, 2020 08:41
@struan struan merged commit 6aece0d into master Sep 25, 2020
@github-pages github-pages bot temporarily deployed to github-pages September 25, 2020 08:42 Inactive
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

2 participants