Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Download CSV] "Other" multiple choice values appear as blank #2099

Closed
gino-m opened this issue Nov 17, 2024 · 7 comments
Closed

[Download CSV] "Other" multiple choice values appear as blank #2099

gino-m opened this issue Nov 17, 2024 · 7 comments
Assignees
Milestone

Comments

@gino-m
Copy link
Collaborator

gino-m commented Nov 17, 2024

These values appear blank in the exported data when no user text is specified.

Expected: "Other" or "Other: " (without <>).

@rfontanarosa

@gino-m gino-m added the type: bug Something isn't working label Nov 17, 2024
@gino-m gino-m added this to the GA release milestone Nov 17, 2024
@rfontanarosa
Copy link
Collaborator

this is the db when other text is specified:

Image

this is the db when other text is left blank:

Image

proto doesn't convert otherText:

MultipleChoiceResponses {selectedOptionIds: Array(0), otherText: 'ttt'}
MultipleChoiceResponses {selectedOptionIds: Array(0)}

@gino-m
Copy link
Collaborator Author

gino-m commented Nov 18, 2024

We should fix this upstream in the Android app (google/ground-android#2846). Once fixed, can we retroactively patch the db by looking for cases where field 7 is specified but empty? This won't help in multiple select (checkbox) cases where >1 value was selected, but we can at least patch the cases where only "other" was selected with no text.

@rfontanarosa
Copy link
Collaborator

in any case, I think that a change should be done. Let's leave "Other: X" if the value exists, and just "Other" if the value is empty.

in submission view and export csv.

@gino-m wdyt?

@gino-m
Copy link
Collaborator Author

gino-m commented Nov 18, 2024

in any case, I think that a change should be done. Let's leave "Other: X" if the value exists, and just "Other" if the value is empty.

in submission view and export csv.

Yep, that was my suggestion. Does the deserializer give you an empty MultipleChoiceSelection object when "Other" is selected but no text specified? Or will you need to add a workaround the proto deserializer?

@rfontanarosa
Copy link
Collaborator

it gives back an empty object. in theory we should add a workaround in the deserializer but I think it is better to fix it android side. at the moment we have:

{
    8:
    [
        {
            2: "taskId",
            7: {}
        }
    ]
}

we should have

{
    8:
    [
        {
            2: "taskId",
            7: {2: ""}
        }
    ]
}

@gino-m
Copy link
Collaborator Author

gino-m commented Nov 19, 2024

@rfontanarosa Yes, I was suggesting fixing it on the Android side, but trying to see where we could add a workaround web and export side in the meantime. If the TypeScript implementation returns an empty object only when there's an "Other" with no text, can we add a patch to interpret that as such?

@gino-m gino-m removed the type: bug Something isn't working label Nov 19, 2024
@rfontanarosa
Copy link
Collaborator

rfontanarosa commented Nov 26, 2024

closed by #2102

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants