Skip to content
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

Autonumbering behavior differs from Specify 6 #5420

Open
melton-jason opened this issue Nov 28, 2024 · 0 comments
Open

Autonumbering behavior differs from Specify 6 #5420

melton-jason opened this issue Nov 28, 2024 · 0 comments
Labels
1 - Bug Incorrect behavior of the product

Comments

@melton-jason
Copy link
Contributor

melton-jason commented Nov 28, 2024

Describe the bug
Specify 6 and Specify 7 treat autonumbering differently.
Specify 6 only filters and matches other records in the table based on the part of the formatter which increments.
Specify 7 filters and matches other records based on the non-incrementing parts of the field.

To Reproduce
Define a field formatter which contains parts which must be entered by the user, and at least one numeric incrementing field.
(Don't forget to assign the field formatter to the field in the Schema Configuration tool. If the format is for CollectionObject -> catalogNumber, also follow the steps outlined in https://discourse.specifysoftware.org/t/to-change-the-assigned-catalog-number-format-default/282)

Consider the below format for the CollectionObject -> catalogNumber field:

  <format system="false" name="NumericTest" class="edu.ku.brc.specify.datamodel.CollectionObject" fieldname="catalogNumber">
  <autonumber>edu.ku.brc.specify.dbsupport.CollectionAutoNumberAlphaNum</autonumber>
    <field type="numeric" size="4"/>
    <field type="separator" size="1" value="."/>
    <field type="numeric" size="2"/>
    <field type="separator" size="1" value="-"/>
    <field type="numeric" size="6" inc="true"/>
  </format>

The format has the pattern NNNN.NN-######, where each N is a number entered by the user, and each # is automatically incremented.

Reproduction instructions for both Specify 6 and 7

  • On the Data Entry form for the table, enter a value in the field and save the form
  • Add another record, ensuring the non-incrementing parts of the field differ from the first

In Specify 6

  • See that regardless of the value of the non-incrementing parts of the field, the incrementing part is 'globally respected'
sp6_behavior.mov

In Specify 7

  • See that the incrementing parts of the field will always start over if there are no other records which exactly match the non-incrementing parts of the field
sp7_behavior.mov

Please fill out the following information manually:

  • OS: macOS Sonoma 14.3 (M1 chip)
  • Browser: Chrome
  • Specify 7 Version: production and v7.9.7

Reported By
Taran Meyer from the Canadian Food Inspection Agency (CFIA)

Additional context
For a more in-depth explanation on the autoincrementing behavior in Specify 7 see #5234 (comment)

@melton-jason melton-jason added 1 - Bug Incorrect behavior of the product 2 - App Resources Issues that are related to app resources and removed 2 - App Resources Issues that are related to app resources labels Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - Bug Incorrect behavior of the product
Projects
None yet
Development

No branches or pull requests

1 participant