[
https://mifosforge.jira.com/browse/MIFOS-4892?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ćukasz Babski closed MIFOS-4892.
--------------------------------
I am closing this issue. There is no need to fix this ticket, User can resolve
this problem manually according to Udai's instructions.
> Survey Migration not mapping single select or choice responses correctly
> ------------------------------------------------------------------------
>
> Key: MIFOS-4892
> URL: https://mifosforge.jira.com/browse/MIFOS-4892
> Project: mifos
> Issue Type: Bug
> Components: QuestionGroups/Surveys/PPI
> Affects Versions: Release 2.0.2
> Reporter: Udai Gupta
> Assignee: Udai Gupta
> Attachments: actual.png, expected.png, testdata-1.6.sql.zip
>
>
> Survey responses are not being migrated correctly when upgrading from Mifos
> 1.6 to 2.0
> Mifos 1.6 test database is attached to this issue.
> Two screenshot are also attached to this issue.
> 1) expected.png , at Mifos 1.6 the response is shown correctly, and same
> should appear after upgrading to 2.0
> 2) actual.png , after upgrading to Mifos 2.0 survey responses are lost (not
> correctly mapped) for Choice or Single select type
> NOTE: This bug is related to responses only single select OR choice type of
> Survey (not custom fields).
> So, it won't affect users who are not using Survey with Single Select OR
> Choice type question.
> An upgrade might need to be created to fix this issue.
> {noformat}
> mysql> select * from question_choices;
> +-----------+-------------+------------------------------------------------------------------------------------+--------------+-----+------------+
> | choice_id | question_id | choice_text
> | choice_order | ppi | ppi_points |
> +-----------+-------------+------------------------------------------------------------------------------------+--------------+-----+------------+
> .............
> .............
> | 34 | 11 | select 1
> | 0 | N | NULL |
> | 35 | 11 | select 2
> | 1 | N | NULL |
> +-----------+-------------+------------------------------------------------------------------------------------+--------------+-----+------------+
> 35 rows in set (0.00 sec)
> mysql> select * from question_group_response;
> +----+----------------------------+---------------------9--+--------------+------+
> | id | question_group_instance_id | sections_questions_id | response |
> tag |
> +----+----------------------------+-----------------------+--------------+------+
> | 1 | 1 | 1 | 34 |
> NULL |
> | 2 | 1 | 2 | TQ2 response |
> NULL |
> +----+----------------------------+-----------------------+--------------+------+
> {noformat}
> OR the code be fixed in the next point release of 2.0.x (2.1.x won't have
> this code as survey code is removed from there)
> {code}
> diff --git
> a/application/src/main/java/org/mifos/customers/surveys/business/SurveyResponse.java
>
> b/application/src/main/java/org/mifos/customers/surveys/business/SurveyResponse.java
> index 7a11a39..1416267 100644
> ---
> a/application/src/main/java/org/mifos/customers/surveys/business/SurveyResponse.java
> +++
> b/application/src/main/java/org/mifos/customers/surveys/business/SurveyResponse.java
> @@ -175,7 +175,7 @@ public class SurveyResponse implements
> Comparable<SurveyResponse> {
> }
>
> else if (answerType == AnswerType.CHOICE || answerType ==
> AnswerType.SINGLESELECT) {
> - return Integer.toString(getChoiceValue().getChoiceId());
> + return getChoiceValue().getChoiceText();
> }
>
> else if (answerType == AnswerType.MULTISELECT) {
> {code}
> It was interesting that 100+ GB database didn't had any survey(except PPI
> which will be migrated externally) which we used for testing.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://mifosforge.jira.com/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mifos-issues mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mifos-issues