Skip to content

survey_response/read doesn't allow both survey_id_list and prompt_id_list #896

@krozett

Description

@krozett

The documentation doesn't suggest that the two are mutually exclusive. Furthermore if you try to make a request where both are present, you get an error message:

Both a survey list (survey_id_list) and a prompt list (prompt_id_list) must be given.

Going by the code here:

else if(((tSurveyIds != null) && (tSurveyIds.size() > 0)) &&

It looks like it doesn't allow both to be passed in, but that's the opposite of what the error message says. I'm not familiar with the internals of Ohmage, but it doesn't seem reasonable to make this restriction. We have a case where we want to get all responses to a given question in a given survey, and we are forced to pass in only the prompt_id_list. This isn't a huge deal since all our surveys have unique prompt ids, but I can see this being a problem for others who have the same prompt ids in different surveys.

Please either remove the restriction, or make the error message and documentation consistent with the behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions