Skip to content

Data in fields with Regex formats changes appearance in 7.12+ #8129

Description

@bronwyncombs

Describe the bug

The visual editor in the Field Formatters/UIFormatters changes regex field formats in v7.12.0+. The entry for the value="" attribute is altered in both the XML and visual editor after using this version.

Further, fields with these formats show changed values in query results and on the forms.

This was introduced in #5075 with commit fd49c36

To Reproduce
Steps to reproduce the behavior:

  1. Go to db in v7.11.4
  2. Create Regex field format
  3. Add records according to the regex format
  4. Query those records and save the query
  5. Go to v7.12.0 + and run the same query
  6. See values appear changed in results; the form doesn't allow saving the previous value

Expected behavior

Regex field format definitions should remain the same in the Field Formatters/UIFormatters file. Fields shouldn't have appear to have data changes/loss in queries or on forms in a new version.

Screenshots
If applicable, add screenshots to help explain your problem.

v7.11.4
Image

v7.12
Image

Image
Screen.Recording.2026-05-28.at.11.50.40.AM.mov

Please fill out the following information manually:

  • OS: mac
  • Browser: chrome
  • Specify 7 Version: 7.12.0
  • Database Name: sp7demofish
  • Collection name: KU Fish Tissue
  • User Name: sp7demofish
  • URL: localhost

Reported By
CSIRO in 795

Additional context

Testing based on the following format:

<format system="false" name="LoanNumberTest" class="edu.ku.brc.specify.datamodel.Loan" fieldname="loanNumber">
      <field type="regex" size="13" minsize="12" value="(CANB|CBG|CNS|JCT|QRS)-([0-9]{4})-([0-9]{3})" pattern="eg. CANB-2024-001" />
</format>

In v7.12.0, the visual editor shows "CANB|CBG|CNS|JCT|QRS)-([0-9]{4})-([0-9]{3}" in the value field. The XML editor has value="/^(CANB|CBG|CNS|JCT|QRS)-([0-9]{4})-([0-9]{3})$/ "

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    2 - App ResourcesIssues that are related to app resources2 - User InterfaceIssues that are related to the user interface or user experience.regressionThis is behavior that once worked that has broken. Must be resolved before the next release.

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions