lsgs/redcap-record-autonumbering

Project level configuration contradiction: Specify a fixed prefix (can be blank)

ChemiKyle opened this issue · 1 comments

In the Project level EM config, when using Record auto-numbering option "Padded integer increment with prefix", the field "Specify a fixed prefix (can be blank)" is misleading. Leaving this blank throws an alert:

if (!array_key_exists($prefixOpt, $this->config)) {
throw new AutonumberConfigException('Prefix configuration required');
}

I'm not sure what your intent with this option is, but in its current state the field is "soft" required with a popup any time the config page is loaded.

lsgs commented

Thanks @ChemiKyle. I committed a fix that enables the prefix to be blank. It's not really a pattern I'd recommend to anyone, but it enables a numbering scheme like 001, 002, 003, ...