rokwire / surveys-building-block

Building Block that manages surveys in the Rokwire Platform.
Apache License 2.0
0 stars 1 forks source link

[BUG] Fail to load survey responses #30

Closed dobromirdobrev closed 9 months ago

dobromirdobrev commented 10 months ago

Describe the bug The admin app is not able to load survey responses using the admin /responses API. The API returns http 500 error.

Expected behavior Responses admin API https://api-dev.rokwire.illinois.edu/surveys/doc/ui/index.html#/Admin/get_api_admin_surveys__id__responses to return actual survey responses.

Additional context Request:

GET: https://api-dev.rokwire.illinois.edu/surveys/api/admin/surveys/d53ef044-fdf1-4e15-9405-5d56854f0738/responses

Response: code: 500

{
  "message": "Error getting survey: invalid survey: calendar_event_id=",
  "status": "internal-server-error"
}
roberlander2 commented 9 months ago

Hi @dobromirdobrev,

I looked into this issue and this is the result of the incorrect survey ID being sent in the request. The survey ID being sent is for a template survey, which will never have survey responses, instead of the event survey ID. I made a PR to fix this issue. I will also make a PR for this issue to remove the deprecated flag from the admin /responses API.

dobromirdobrev commented 9 months ago

Hi @dobromirdobrev,

I looked into this issue and this is the result of the incorrect survey ID being sent in the request. The survey ID being sent is for a template survey, which will never have survey responses, instead of the event survey ID. I made a PR to fix this issue. I will also make a PR for this issue to remove the deprecated flag from the admin /responses API.

Thank you, @roberlander2 !