Skip to content

questions.yml file expected when label is NULL #268

@saudiwin

Description

@saudiwin

Bug description

When the sd_question function is called, the default for label is NULL. However, if label is NULL, the sd_question function will expect there to be a local questions.yml file with a full question description.

However, this means that you can't programatically define a question without a label -- which seems like a reasonable use case. It seems like testing for only a missing label might be fairly restrictive to the user. Also, it would be nice if the error message were more informative -- I was confused initially because there is a questions.yml file, just not a local questions.yml file. I.e., it might be good to provide an error message that informs the user what they are missing (enough info in the sd_question call).

Steps to reproduce

sd_question(
      type   = 'matrix',
      id     = "regime",
      row  = c("Fish","Dog"),
      option = c("One","Two")
    )

Expected behavior

No response

Actual behavior

No response

Your environment

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions