Skip to content

Use the same age precision for personal and family events - #1554

Merged
DavidMStraub merged 2 commits into
gramps-project:mainfrom
giang17:fix/consistent-event-age-precision
Oct 19, 2026
Merged

DavidMStraub merged 2 commits into
gramps-project:mainfrom
giang17:fix/consistent-event-age-precision

Conversation

@giang17

@giang17 giang17 commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Linked issue

Closes #1366

What this changes

GrampsjsViewPerson._fetchTimeline() now requests /api/people/<handle>/timeline with precision=1, the same value getUrl() uses for the person profile. With only Personal selected the age column shows the profile ages, with Family or Relatives switched on it shows the timeline ages, so both views now show years only (e.g. 32 years).

How it was tested

Dev container with the example tree, language German, person I0624 (Raymond E. Garner), events section: with only Personal selected the age column shows 0 Tage, 32 Jahre, 42 Jahre; after switching on Family the timeline is requested with precision=1 and the same three values are shown. On main the second state shows 32 Jahre, 9 Monate and 42 Jahre, 7 Monate. eslint and prettier pass on the changed file.

Events section with Personal and Family selected, ages shown in years only

Drafted with an AI assistant.


  • I have read CONTRIBUTING.md
  • This was discussed in an issue first, or it is small enough not to need one
  • I wrote this myself, or used an AI assistant and have reviewed every line

The person view requested the profile with precision=1 but the timeline
with precision=2, so the age column switched between "32 years" and
"32 years, 9 months" depending on whether the Family or Relatives chip
was active. Request the profile with precision=2 as well.

Fixes gramps-project#1366
giang17 added a commit to giang17/gramps-web that referenced this pull request Oct 17, 2026
@DavidMStraub

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-18T06:01:55.607375Z bfb185d Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

An unknown error occurred
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@DavidMStraub

Copy link
Copy Markdown
Member

Thanks, but instead of changing precision=2 there, please change to precision=1 in the timeline request - that was the intention.

Keep the profile request at precision=1 as intended and lower the
timeline request to the same value, so the age column shows years only
whether or not the Family or Relatives chip is active.
@DavidMStraub

Copy link
Copy Markdown
Member

👌

@DavidMStraub
DavidMStraub merged commit 7a6a420 into gramps-project:main Oct 19, 2026
1 check passed
giang17 added a commit to giang17/gramps-web that referenced this pull request Oct 19, 2026
@giang17

giang17 commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

Changed as suggested: the timeline request now uses precision=1, the profile request is unchanged.

@giang17
giang17 deleted the fix/consistent-event-age-precision branch October 19, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Events section has a different view for dates, based on selection of Personal or Personal and Family, Relatives

2 participants