Author: ashish
Date: Wed Mar 24 13:23:53 2010
New Revision: 927049

URL: http://svn.apache.org/viewvc?rev=927049&view=rev
Log:
Fixed two issues: 
1) Wrong variable name used. "surveyResponse" should be used instead of 
"lookupRespMap".
2) Service should allow to update survey response when allowMultiple is set to 
"N" and allowUpdate="Y". Fixed this issue.

Thanks Arun!

Modified:
    
ofbiz/trunk/applications/content/script/org/ofbiz/content/survey/SurveyServices.xml

Modified: 
ofbiz/trunk/applications/content/script/org/ofbiz/content/survey/SurveyServices.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/survey/SurveyServices.xml?rev=927049&r1=927048&r2=927049&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/content/script/org/ofbiz/content/survey/SurveyServices.xml
 (original)
+++ 
ofbiz/trunk/applications/content/script/org/ofbiz/content/survey/SurveyServices.xml
 Wed Mar 24 13:23:53 2010
@@ -433,8 +433,10 @@
                     <field-map field-name="surveyId" 
from-field="survey.surveyId"/>
                 </entity-and>
                 <if-not-empty field="existingResponses">
-                    <add-error><fail-message message="You have already 
responded to this survey; multiple responses are not allowed"/></add-error>
-                    <check-errors/>
+                    <if-compare field="survey.allowUpdate" 
operator="not-equals" value="Y">
+                        <add-error><fail-message message="You have already 
responded to this survey; multiple responses are not allowed"/></add-error>
+                        <check-errors/>
+                    </if-compare>
                 </if-not-empty>
             </if-not-empty>
         </if-compare>
@@ -475,7 +477,7 @@
         <!-- create/update the response -->
         <if-compare field="survey.allowUpdate" operator="equals" value="Y">
             <if-not-empty field="parameters.surveyResponseId">
-                <entity-one entity-name="SurveyResponse" 
value-field="lookupRespMap"/>
+                <entity-one entity-name="SurveyResponse" 
value-field="surveyResponse"/>
             </if-not-empty>
         </if-compare>
 


Reply via email to