Skip to content

Entity declaration too deep when savetos in nested groups #823

@lognaturel

Description

@lognaturel
    md = """
    | survey |
    | | type        | name | label | save_to |
    | | begin_group | g1   | G1    |         |
    | | text        | q1   | Q1    | e1p1    |
    | | begin_group | g2   | G2    |         |
    | | text        | q2   | Q2    | e1p2    |
    | | end_group   | g2   |       |         |
    | | end_group   | g1   |       |         |

    | entities |
    | | list_name | label |
    | | e1        | ${q2}    |
    """

The declaration is put in g2 which means clients ignore/never see/error on the saveto in g1. The form produced is invalid: "An entities:saveto binding MUST be associated with the nearest ancestor container that has an Entity declaration. If no ancestor container has an Entity declaration, the form is invalid."

We want the nearest ancestor container that covers all save_tos and doesn't violate repeat scoping rules.

This seems like a moderately likely form structure. I don't think it's likely to be common enough to block release but it should be addressed at some point.

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