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

Remap answers to MULTIPLE_TEXT questions #35

Merged
merged 39 commits into from
Apr 12, 2018
Merged

Remap answers to MULTIPLE_TEXT questions #35

merged 39 commits into from
Apr 12, 2018

Conversation

jacobwegner
Copy link
Contributor

@jacobwegner jacobwegner commented Apr 12, 2018

This PR adds functionality to "remap" answers to multiple text questions.

It also fixes a bug where FieldResult.answer values for MULTIPLE_TEXT questions were being serialized/deserialized twice and provides a data migration to update previous MULTIPLE_TEXT answers.

Due to the backwards incompatible nature of the data migration, this will likely be released as part of formly 2.x.

Sureiya and others added 30 commits September 14, 2017 14:18
 * Added support for remapping multiple_text answers
Don't want to introduce a backwards incompatible dependency to
formly at this time
use == rather than in to prevent partial matches to
answer_string from being removed from mapping
QueryDict in request.POST has already unquoted values
# Conflicts:
#	formly/tests/tests.py
# Conflicts:
#	formly/tests/tests.py
#	formly/tests/urls.py
#	formly/urls.py
#	formly/utils/views.py
#	formly/views/design.py
#	formly/views/results.py
#	formly/views/run.py
#	tox.ini
@codecov
Copy link

codecov bot commented Apr 12, 2018

Codecov Report

Merging #35 into master will increase coverage by 0.88%.
The diff coverage is 87.09%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #35      +/-   ##
==========================================
+ Coverage   82.05%   82.94%   +0.88%     
==========================================
  Files          15       16       +1     
  Lines         758      815      +57     
  Branches      110      122      +12     
==========================================
+ Hits          622      676      +54     
  Misses        102      102              
- Partials       34       37       +3
Flag Coverage Δ
#py27dj111 82.94% <87.09%> (+0.88%) ⬆️
#py34dj111 82.94% <87.09%> (+0.88%) ⬆️
#py34dj20 82.94% <87.09%> (+0.88%) ⬆️
#py35dj111 82.94% <87.09%> (+0.88%) ⬆️
#py35dj20 82.94% <87.09%> (+0.88%) ⬆️
#py36dj111 82.94% <87.09%> (+0.88%) ⬆️
#py36dj20 82.94% <87.09%> (+0.88%) ⬆️
Impacted Files Coverage Δ
formly/fields.py 71.42% <0%> (-1.3%) ⬇️
formly/forms/widgets.py 93.75% <100%> (+23.16%) ⬆️
formly/models.py 82.13% <84.61%> (+0.11%) ⬆️
formly/views/results.py 90.69% <88.57%> (-9.31%) ⬇️
formly/utils/remapping.py 91.66% <91.66%> (ø)

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 64e31ed...9e9f09c. Read the comment docs.

@jacobwegner jacobwegner changed the title WIP: Remap MULTIPLE_TEXT responses Remap answers to MULTIPLE_TEXT questions Apr 12, 2018
@jacobwegner jacobwegner requested a review from paltman April 12, 2018 16:28
@paltman
Copy link
Contributor

paltman commented Apr 12, 2018

Cool stuff! 👍

@jacobwegner jacobwegner merged commit c4f2364 into master Apr 12, 2018
@jacobwegner jacobwegner deleted the remapping-v1 branch April 12, 2018 17:39
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.

3 participants