Repository navigation
Use the same age precision for personal and family events - #1554
DavidMStraub merged 2 commits into
Conversation
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
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
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.
|
👌 |
|
Changed as suggested: the timeline request now uses |
Linked issue
Closes #1366
What this changes
GrampsjsViewPerson._fetchTimeline()now requests/api/people/<handle>/timelinewithprecision=1, the same valuegetUrl()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 withprecision=1and the same three values are shown. Onmainthe second state shows32 Jahre, 9 Monateand42 Jahre, 7 Monate.eslintandprettierpass on the changed file.Drafted with an AI assistant.