Using join() on number fields appends a ".0"

Open
#922 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
64/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
frontend

Research direction

Start with the form referenced in #920 and reproduce the join() behavior using integer and decimal number fields. Trace the join() handling for referenced values; done means integer values retain their displayed form without a trailing .0 while decimal values such as 3.5 remain unchanged.

Written by the indexing model from the issue text.

Description

Expected Behaviour

When calling join passing in references to elements which contain integers you expect the output string to include the number as shown.

Observed Behaviour

You actually get the number in the format that is going to be submitted to Central, eg: 1.0, 3.5 rather than 1, 3.5.

Reproduction Steps

Form (XML or XLSX file): Use the form in #920

Additional Context

Split off from #920

Dominant language
TypeScript
Stars
38
Forks
24
PR merge metrics
No merged PRs in 30d

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from getodk/web-forms

All issues in getodk/web-forms

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.