Hi,
Has anyone created autonumbering for the disposal number? I received an error, see below: (Note: I have posted the issue in Github, but there is no response; therefore, I am reposting here just in case anyone experiences a similar problem).
Environment:
OS: Mac
Browser: Safari
Specify 7 Version: 7.9.6.2
Error when creating Disposal Number with auto-increment “model Disposal has no hierarchy field”
To Reproduce
- Add the following in UIFormatters
<format system="false" name="DisposalNumber" class="edu.ku.brc.specify.datamodel.Disposal" fieldname="disposalNumber">
<autonumber>edu.ku.brc.af.core.db.AutoNumberGeneric</autonumber>
<field type="year" size="4" value="YEAR" byyear="true"/>
<field type="separator" size="1" value="-"/>
<field type="numeric" size="3" inc="true"/>
</format>
- In schema config, select Disposal table, and set the formatter of disposalNumber as follows:
- When creating a disposal, the system raises Exception Value: queryset model Disposal has no hierarchy field.
Expected behavior
A disposal can be created with the autonumbering specified, e.g. 2025-001, 2025-002.