svn commit: r544080 - /ofbiz/branches/release4.0/applications/content/script/org/ofbiz/content/survey/SurveyServices.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r544080 - /ofbiz/branches/release4.0/applications/content/script/org/ofbiz/content/survey/SurveyServices.xml

lektran
Author: lektran
Date: Mon Jun  4 00:14:40 2007
New Revision: 544080

URL: http://svn.apache.org/viewvc?view=rev&rev=544080
Log:
Applied fix from trunk for revision: 543397

Modified:
    ofbiz/branches/release4.0/applications/content/script/org/ofbiz/content/survey/SurveyServices.xml

Modified: ofbiz/branches/release4.0/applications/content/script/org/ofbiz/content/survey/SurveyServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/content/script/org/ofbiz/content/survey/SurveyServices.xml?view=diff&rev=544080&r1=544079&r2=544080
==============================================================================
--- ofbiz/branches/release4.0/applications/content/script/org/ofbiz/content/survey/SurveyServices.xml (original)
+++ ofbiz/branches/release4.0/applications/content/script/org/ofbiz/content/survey/SurveyServices.xml Mon Jun  4 00:14:40 2007
@@ -499,9 +499,19 @@
         <get-related value-name="surveyResponse" relation-name="SurveyResponseAnswer" list-name="existingAnswers"/>
         <iterate entry-name="existingAnswer" list-name="existingAnswers">
             <set field="currentAnswersFieldName" from-field="existingAnswer.surveyQuestionId"/>
-            <if-not-empty field-name="existingAnswer.surveyMultiRespColId">
-                <set field="currentAnswersFieldName" value="${currentAnswersFieldName}_${existingAnswer.surveyMultiRespColId}"/>
-            </if-not-empty>
+            <if>
+                <condition>
+                    <and>
+                        <not>
+                            <if-empty field-name="existingAnswer.surveyMultiRespColId"/>
+                        </not>
+                        <if-compare operator="not-equals" field-name="existingAnswer.surveyMultiRespColId" value="_NA_"/>
+                    </and>
+                </condition>
+                <then>
+                    <set field="currentAnswersFieldName" value="${currentAnswersFieldName}_${existingAnswer.surveyMultiRespColId}"/>
+                </then>
+            </if>
             <set field="currentAnswers.${currentAnswersFieldName}" from-field="existingAnswer"/>
         </iterate>
 
@@ -613,12 +623,17 @@
             <set field="responseAnswer" from-field="currentAnswers.${currentFieldName}"/>
         </if-not-empty>
         
-        <if>
+       <if>
             <condition>
                 <or>
                     <if-empty field-name="responseAnswer"/>
                     <if-compare-field field-name="responseAnswer.surveyQuestionId" operator="not-equals" to-field-name="surveyQuestionAndAppl.surveyQuestionId"/>
-                    <if-compare-field field-name="responseAnswer.surveyMultiRespColId" operator="not-equals" to-field-name="surveyMultiRespColumn.surveyMultiRespColId"/>
+                    <and>
+                        <not>
+                            <if-empty field-name="surveyMultiRespColumn"/>
+                        </not>
+                        <if-compare-field field-name="responseAnswer.surveyMultiRespColId" operator="not-equals" to-field-name="surveyMultiRespColumn.surveyMultiRespColId" />
+                    </and>
                 </or>
             </condition>
             <then>
@@ -638,7 +653,6 @@
                 <create-value value-name="responseAnswer"/>
             </then>
         </if>
-        
         <if-not-empty field-name="answers.${currentFieldName}">
             <if-compare field-name="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="BOOLEAN">
                 <set field="responseAnswer.booleanResponse" from-field="answers.${currentFieldName}"/>