Skip to content

Fix: Trim leading zeros and keep decimal digits in formatted fields#7809

Open
CarolineDenis wants to merge 3 commits intomainfrom
issue-7451
Open

Fix: Trim leading zeros and keep decimal digits in formatted fields#7809
CarolineDenis wants to merge 3 commits intomainfrom
issue-7451

Conversation

@CarolineDenis
Copy link
Contributor

@CarolineDenis CarolineDenis commented Mar 12, 2026

Fixes #7451

Checklist

  • Self-review the PR after opening it to make sure the changes look good and
    self-explanatory (or properly documented)
  • Add relevant issue to release milestone

Testing instructions

  • Create a new field formatter for cat num and check 'trim leading zero'
  • Create a new field formatter for locality, add longitude and latitude to the fields, check trim zeros for each.
  • Open the QB with CO as base table
  • Add CO formatted and locality formatted
  • Verify that the leading 0s are removed for CO and that the decimals after the longitude and latitude are kept.

@CarolineDenis CarolineDenis added this to the 7.12.1 milestone Mar 12, 2026
@github-project-automation github-project-automation bot moved this to 📋Back Log in General Tester Board Mar 12, 2026
@CarolineDenis CarolineDenis requested review from a team and alesan99 March 18, 2026 13:13
Copy link
Contributor

@alesan99 alesan99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Verify that the leading 0s are removed for CO and that the decimals after the longitude and latitude are kept.

The formatting is working as expected 👍
Image

Image

The frontend formatter remains unchanged, but I think that's fine since it trims the trailing zeros anyway. Just making a note.

formatted = Number.isNaN(Number(formatted))

Image

Though since the setting isn't just used to remove leading zeros anymore, could it be renamed to "Trim zeros"?

@Iwantexpresso Iwantexpresso self-requested a review March 18, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 📋Back Log

Development

Successfully merging this pull request may close these issues.

"Trim Zeros" option turns decimals into integers

3 participants