Update Survey Response?

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

Update Survey Response?

James McGill-5
Another question on Survey if you don't mind.

If I bring up a SurveyResponse,
content/control/FindSurveyResponse?surveyId=NNNN
And then try to edit the response,
content/control/EditSurveyResponse?surveyResponseId=ZZZZZ
It looks as if submitting changes is always creating a new response, instead
of editing one in place.
This is true even if "Allow Update" = "Y".

What am I missing?    It looks to me like createSurveyResponse in
SurveyServices.xml is intended to be
a "create or update" service.


--
James McGill
Phoenix AZ
Reply | Threaded
Open this post in threaded view
|

Re: Update Survey Response?

James McGill-5
I found that "Edit Survey Response" always creates a new response, instead
of updating one.

I believe this is a bug in
applications/content/script/org/ofbiz/content/survey/SurveyServices.xml

---
applications/content/script/org/ofbiz/content/survey/SurveyServices.xml.orig
2009-09-30 00:27:18.000000000 -0700
+++
applications/content/script/org/ofbiz/content/survey/SurveyServices.xml
2009-09-30 00:28:06.000000000 -0700
@@ -475,7 +475,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>


--
James McGill
Able Engineering
Phoenix AZ
Reply | Threaded
Open this post in threaded view
|

Re: Update Survey Response?

Jacques Le Roux
Administrator
Hi,

Did you experience an issue or was it only looking at code (I did not review code yet) ?
If you experienced an issues could you please give us

Why
    *  What you were looking for,
    * Wow did you try to achieve it
    * What did you expect as results
    * And what you really got
How
    # What you did (including detailed steps to reproduce)
    # What you expected to happen
    # What actually happened (including exact quotes of error messages, etc)
    # If possible provide an URL

Thanks

Jacques

From: "James McGill" <[hidden email]>

>I found that "Edit Survey Response" always creates a new response, instead
> of updating one.
>
> I believe this is a bug in
> applications/content/script/org/ofbiz/content/survey/SurveyServices.xml
>
> ---
> applications/content/script/org/ofbiz/content/survey/SurveyServices.xml.orig
> 2009-09-30 00:27:18.000000000 -0700
> +++
> applications/content/script/org/ofbiz/content/survey/SurveyServices.xml
> 2009-09-30 00:28:06.000000000 -0700
> @@ -475,7 +475,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>
>
>
> --
> James McGill
> Able Engineering
> Phoenix AZ
>