Skip to content

Lat/Long values with two direction characters are improperly parsed #8393

Description

@bronwyncombs

Describe the bug
A clear and concise description of what the bug is.

On a Locality record, a latitude or longitude value with two characters denoting direction (i.e., - and N/S/E/W) (e.g., -157 W) is shown as 157° E when parsed on the form.

Image
Screen.Recording.2026-08-03.at.12.33.57.PM.mov

Further, conflicting directions are not caught, e.g., -157 E --> -157 W , -50 S --> -50 N

Image

Expected behavior
A clear and concise description of what you expected to happen.

  • double directions should be interpreted as if one was present
  • conflicting direction characters (e.g., -157 E) should have save blocked

Please fill out the following information manually:

  • OS: mac OS
  • Browser: Chrome
  • Specify 7 Version: v7.12.0.7
  • Database Name: KU Fish
  • Collection name: KU Fish Tissue
  • User Name: spfishadmin

Reported By
Joe Russack @ California Academy of Sciences in 1181

Additional context
Database name or any other context about the problem here.

InmakeLatLong() the two signs are multiplied:

const sign = (direction === 's' || direction === 'w' ? -1 : 1) * originalSign;"-157.14015 W"   ->  +157.14015     (both mean west; result is east)"-232'45.1\"S"  ->  +23.045861     (both mean south; result is north)

see #8370

Metadata

Metadata

Assignees

No one assigned

    Labels

    2 - FormsIssues that are related to the form system2 - User InterfaceIssues that are related to the user interface or user experience.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions