-
Notifications
You must be signed in to change notification settings - Fork 36
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expand Auto-Numbering Functionality for Catalog Numbers #5234
Comments
Correct me if I'm wrong or misunderstanding the requirement, but isn't this functionality already present in Specify? Screen.Recording.2024-11-19.at.11.40.51.AM.mov <format system="false" name="PrefixedCatalogNumber" class="edu.ku.brc.specify.datamodel.CollectionObject" fieldname="catalogNumber">
<field type="regex" size="3" minsize="3" value="[A-Z]{3}" pattern="AAA"/>
<field type="separator" size="1" value="-"/>
<field type="numeric" size="6" inc="true"/>
</format> (There's currently a bug in where the pattern isn't being inserted into the form, but you can still see the behavior of auto-incrementing) If the prefix/suffix is static, you can use a constant field instead for the same effect: <format system="false" name="GeoCatalogNumber" class="edu.ku.brc.specify.datamodel.CollectionObject" fieldname="catalogNumber">
<field type="constant" size="3" value="MIN"/>
<field type="separator" size="1" value="-"/>
<field type="numeric" size="6" inc="true"/>
</format> The incrementing numeric field will match against other records which have the same prefix/suffix specify7/specifyweb/specify/uiformatters.py Lines 134 to 137 in 6e7bd96
specify7/specifyweb/specify/uiformatters.py Lines 104 to 108 in 6e7bd96
specify7/specifyweb/specify/uiformatters.py Lines 189 to 268 in 6e7bd96
|
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Description:
Enhance the auto-numbering system to allow for more complex numbering schemes, including the ability to incorporate prefixes and suffixes while maintaining unique identifiers.
Acceptance Criteria:
@realVinayak demonstrated that you can (mis)use the
byyear
numbering system to have an auto-incrementing system based on a generic prefix:The text was updated successfully, but these errors were encountered: