Skip to content

Evaluate task conditions against the "Other" answer (MultipleChoiceSelection.other_selected) #3821

Description

@rfontanarosa

see google/ground-platform#2539.

Because "Other" is not a real option (it doesn't have an ID) it is now represented by a bool flag on both the question and the submission:

  • Question: Task.MultipleChoiceQuestion.has_other_option
  • Submission: Submission...MultipleChoiceResponses.other_selected (+ other_text)

To let conditions key distinguish this, the condition proto now carries a new field:

message MultipleChoiceSelection {
  repeated string option_ids = 1;
  string task_id = 2;
  bool other_selected = 3;  // NEW
}

When other_selected is true, the condition should pass if the data collector selected "Other" on the referenced task. It may be combined with option_ids (SELECT_MULTIPLE) — the condition passes if any listed option is selected or, when other_selected is true, if "Other" is selected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    No fields configured for Feature.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions