You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Show Time Worked on Each Ticket and What Was Sent to Redmine - #920
Time you've worked on a ticket, and how much of it reached Redmine, now shows on screens you already use. There's no new screen.
Where
What you see
Tickets list, every row (All tickets and My Board)
A chip on the row's top line with your total time on the ticket, e.g. "2h 10m". It shows only when you have a minute or more on the ticket.
Ticket page header
A badge with the same total, e.g. "2h 10m logged". It updates when your timer starts or stops.
Ticket page timer
"Resume · 2h 10m" instead of "Start timer" when you have time on the ticket, or "Add & Resume · …" when it isn't on My Board. While the timer runs, the button is a small pause button with a green time pill beside it, the same height as the other buttons.
Activity card on the ticket page
Each finished session says how much of its day went to Redmine, for example "Sent 0.5 h to Redmine", "Sent 0.5 h to Redmine, 20m not sent yet", "10m not sent to Redmine yet" or "Marked "Never send"". It links to that day's time in Redmine: "View in Redmine ↗".
Timesheet
Under each shift, one row per ticket (not per session), with its time and the same Redmine line. A source filter on the right of the Sessions header narrows the tickets and their time to the sources you pick.
Clock-out wrap-up
Each ticket in the wrap-up message posted to Huddle shows the time you spent on it that session, e.g. 1h 20m.
What the total counts
Your own time only, never other people's.
Time from TimeHuddle's timers. Finished runs count; a running timer is added when it stops.
Time that goes to Redmine counts as Redmine will hold it. This covers a Redmine issue's time, and a Huddle ticket's time while it was linked to an issue. For each day, time marked Never send is taken out, and the rest is rounded up to the step the organization set for that Redmine server. That is the same formula a send uses, now shared (owedMinutes), so the chip matches Redmine before and after you send. Time not sent yet counts, since it can still be sent. Time logged while a ticket wasn't linked stays exact.
Your own time logged in Redmine that this TimeHuddle didn't send. That covers time entered in Redmine itself, or sent from another TimeHuddle, on the issue or on the issue a ticket is linked to. Entries this TimeHuddle sent are left out, since they're already counted from its timers.
Timesheet source filter
A ghost Funnel button on the far right of the Sessions header. It appears only when there's more than one source.
The list has All and then each source, named by the identifier your organization registered (TH, PM0), not by the server's name.
You can pick several sources. Picking every one turns All back on, and the button then reads "All sources".
Filtering narrows each shift's tickets and their durations. Shifts with no ticket time on the picked sources are hidden. The summary cards above the list are unchanged.
How it works
Receipts (redmine-receipts.js, redmine-receipts-core.js). These work out, for each closed session, how much of its Redmine issue-day was sent. They use the same redmineTicketDaysFor, pushLedgerFor and unsentTotals as the Send dialog, so the two always agree. A receipt is { issueId, date, url, entries: [{ id, hours }], discarded, unsentSeconds }. url is Redmine's spent-time list filtered to the issue, the day and the caller (/time_entries?set_filter=1&issue_id=…&user_id=me&spent_on=…). Receipts come back only to someone with a Redmine account, for their own time, and on the timesheet only for their own sheet.
timers.getTicketTotals({ tickets: [{ source, ticketId }] }) (new). Returns totals keyed source:ticketId, for up to 500 tickets per call; the client splits longer lists. A source without timers (GitHub, for now) is skipped, not refused. A ticket with nothing left to show has no entry.
timers.getTicketTotal. Now counts the same way as the list, so a row's chip and its page header agree.
Time that goes to Redmine.
roundedIssueSeconds covers Redmine issues. linkedSendAdjustment covers linked Huddle tickets: it's added to their exact time, and is negative where time was marked Never send.
Both use the Send's own roundingStepsFor, pushLedgerFor and the shared owedDaySeconds / owedMinutes in redmine-time-entries.js.
Time in Redmine only (ownRedmineOnlyByIssue).
Reads the caller's newest 500 Redmine time entries (user_id=me, up to 5 pages), cached for 5 minutes.
The cache is cleared when the user sends, connects or disconnects.
Entries in the ledger, i.e. sent by this TimeHuddle, are subtracted.
One read covers a whole list, not one call per row. If Redmine can't be reached, totals fall back to TimeHuddle time.
Screens stay current. A send or Never send, from the Clock page's dialog or the prompt after a timer stops, dispatches tickets:refetch (refreshTicketTimes), which the rows, the ticket page and its Activity already reload on.
Under a minute.formatLoggedTime hides the total below 60 seconds on the row chip, the header badge and the Resume label, rather than showing "0m".
Wrap-up times (wrapUpTimes.ts). On clock-out, each linked ticket in the wrap-up post gets its session time appended (sessionSecondsByTicket, withTicketTimes), counting a running stint up to the clock-out.
timers.getTicketSessions and clock.timesheet. Their ticket sessions now include redmine. The timesheet's ticket sessions also include date and redmineIssueId.
Timesheet filter (timesheetSources.ts, TimesheetSourceFilter.tsx). Built from @mieweb/uiDropdown, DropdownItem and a ghost Button. Each choice is a menuitemcheckbox.
Removed: the unused ticketApi.getTotal, and the "Stop timer" label the ticket page no longer shows.
Known limits
Older Redmine-only time. Only the newest 500 of your Redmine entries count, so very old time logged only in Redmine can be missing from a total.
Up to 5 minutes' delay. Time logged in Redmine takes up to 5 minutes to show.
Sent entries aren't read back. If an entry TimeHuddle sent is later edited in Redmine, TimeHuddle still shows what it sent.
Timesheet, Activity and the wrap-up stay exact. They list individual runs, sessions and shifts, while rounding applies to a whole issue-day.
Two tickets on one Redmine issue. When two Huddle tickets are linked to the same issue, each is rounded on its own, and a day marked Never send is split between them in the order they're read. Their chips can then add up to slightly more than Redmine holds.
Added to release-notes/1.3.0.md under "See the time you've logged on each ticket", with a line for #920 in the pull request list.
Tests
Unit:
redmine-receipts-core.test.ts, redmineReceipt.test.ts, shiftTicketRows.test.ts, timesheetSources.test.ts, TimesheetSourceFilter.test.tsx and wrapUpTimes.test.ts.
New cases in activityEntries.test.ts, TimesheetRow.test.tsx, redmine-time-entries.test.ts (owedDaySeconds) and timeUtils.test.ts (formatLoggedTime).
Integration:
timers.test.ts covers getTicketTotals: scoped to the caller, a Redmine issue including its linked ticket's time, a GitHub ticket skipped, and a missing list refused.
ticket-totals-redmine.test.ts (new) runs against a stand-in Redmine. It covers days rounded as a send rounds them, time logged only in Redmine added without counting a sent entry twice, time marked Never send left out, and a row and its ticket page agreeing.
e2e:tests/e2e/timers/ticket-time-log.spec.ts covers the header badge and Resume label, the Activity receipt and its View in Redmine link, and the timesheet ticket rows. The full suite was run locally, and every failure from that run passes on its own.
Checks: lint, typecheck and format are clean; 1,223 frontend and 742 backend unit tests pass. The Meteor backend's lint and typecheck report only what's already on main: none of their errors are in files this PR changes.
…ne (#916)
- Ticket page header shows your total time; its timer reads "Resume · 2h 10m"
- Tickets list timer tooltip and label resume the logged total (timers.getTicketTotals)
- Activity sessions and timesheet ticket rows say what of each day was sent to
Redmine, with links to the entries (redmine-receipts.js)
- Timesheet lists one row per ticket under each shift
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…916)
The receipt line ended with Redmine time entry ids (#668), which read like
ticket numbers and opened an edit form that needs edit permission. It now
ends with one "View in Redmine" link to the issue's spent time, filtered to
that day and the viewer.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Source dropdown in the Sessions header picks All or any of the viewer's
sources, each named by its registered identifier (TH, RM0). Picked sources
keep only the shifts and tickets with time on them, open their ticket lists,
and show their total beside the session count. A Huddle ticket linked to a
Redmine issue counts under Redmine, where its time goes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…een time pill (#916)
The same look as a running row on the Tickets list, in place of the Stop
timer button with its time under it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y source (#916)
timers.getTicketTotals takes { source, ticketId } refs and keys its totals
source:ticketId. A Redmine issue's total includes time on TimeHuddle tickets
while linked to it, as on its page. Rows on All tickets and My Board show the
total as an outlined timer chip; the timer's Resume tooltip now covers Redmine
rows too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d rounds it (#916)
A Redmine issue's total, and the part of a TimeHuddle ticket's that went to a
linked issue, count each day rounded up to the step the organization set for
the user's Redmine server. The rows' chip, the ticket page's header and the
Resume label then show what Redmine gets, before it is sent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…is TimeHuddle didn't send (#916)
Time logged in Redmine itself, or sent by another TimeHuddle, on the ticket's
Redmine issue (or the one it is linked to) is read live with user_id=me, less
the entries this TimeHuddle's ledger sent, and added to the header's total and
the Resume label. Rows' chips still count TimeHuddle time only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e didn't send (#916)
Your newest 500 Redmine entries are read once (cached five minutes, busted by
a send) and matched to the list's Redmine issues and linked tickets, less the
entries this TimeHuddle sent. The ticket page's total reads the same.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in #844's Billable dropdown. clock.js and redmine.js conflicted only
in their imports: both sides' are kept.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ote for #920 (#916)
Integration tests against a stand-in Redmine: a Redmine issue's day rounds up
to the organization's step, a linked ticket rounds only what went to its issue,
your own Redmine-only entries are added and a sent entry isn't counted twice,
and a ticket's page agrees with its row.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…am (#916)
Test users now start on their Personal team, and the timesheet shows only the
selected team's shifts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he issue and day (#916)
Redmine has no /issues/:id/time_entries page (404 on redmine0); its
/time_entries list takes issue_id, user_id and spent_on filters.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…916)
At clock-out each line linking a ticket ends with that ticket's time this
session as an inline-code chip: the total of its runs, a running one counted
to the press. Written into the post then; a ticket under a minute gets none.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Unresolved defects can misreport rounded and unsent time, display stale or mismatched ticket totals, hide timesheet entries, and trigger excessive database queries.
)
A ticket's logged time shows Redmine-bound time as Redmine gets it. A day
marked Never send never reaches Redmine, so its time is left out before
rounding, with the same formula the send uses (owedMinutes), now shared.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A run of a few seconds showed as a "0m" chip on the row, the ticket page's
badge and its Resume label. One helper, formatLoggedTime, now hides it at all three.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…en (#916)
Never send lowers a ticket's logged time, and a send turns "not sent yet"
into "Sent" in its Activity. Both send paths now announce tickets:refetch,
which the rows, the ticket page and its Activity already reload on.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Unresolved findings identify inaccurate time totals, stale totals after refresh, source selections that hide valid shifts, and unbounded database query fan-out.
- Receipts call time waiting only when the Send would offer it, with the
Send's rounding steps: a minute already covered by a rounded-up entry is
not "not sent yet".
- The timesheet's source filter names other organizations' sources when no
team is picked, and drops picks that a team change took away.
- The ticket page keeps only its latest time read, so another ticket's late
answer never lands.
- Pull-to-refresh on Tickets reloads the logged time with the tickets.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Redmine reports whole-minute entries as two-decimal hours, so five 1-minute
entries (0.02 h each) added up to 6m. Whole minutes are recovered first, as
the send ledger already does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Unresolved rounding and discard-allocation errors produce inconsistent ticket totals, while receipt loading introduces unbounded database query fan-out.
No open issues 🎉
2 previously missed issues
In code that hasn't changed since last review
Recover whole minutes before converting Redmine hours
meteor-backend/server/redmine.js:481
Redmine reports whole-minute entries as two-decimal hours, so multiplying those hours directly by 3600 accumulates rounding errors. For example, five 7-minute entries are returned as 0.12 h each and become 36 minutes here instead of 35. Recover whole minutes from each entry before converting to seconds, as pushLedgerFor already does.
Match Redmine servers by hostname consistently
src/features/clock/timesheetSources.ts:37
URL.host includes a non-default port, but the source registry stores URL.hostname (meteor-backend/server/ticket-ids.js:54–59). A registered server such as https://redmine.example.org:8443 therefore never matches here, and the filter displays “Redmine” instead of its registered identifier. Compare hostnames consistently.
#916 asks that a ticket with time logged show its timer as a continuation, e.g. "Resume · 2h 10m", on the detail page and in the Tickets list. In this PR the detail page does that, but in the Tickets list the button keeps its plain label and the time shows as a chip on the row instead (commit "a row's timer button keeps its plain label; the chip shows…").
Can you explain why you went with the chip for the list rather than the Resume label? If it's intentional, we should update the criterion in #916 to match.
@Dharp02 Good catch, thanks. The wording in #916 was wrong: Resume was only ever meant for the ticket detail page, never the Tickets list.
In the list, the timer is a small icon-only play button, so there's no room for "Resume · 2h 10m". Instead, each row shows the logged time as a chip on its top line, and the play button keeps its plain label. The detail page keeps "Resume · 2h 10m".
I've corrected the description and the acceptance criterion in #916 to match.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #916
What changes
Time you've worked on a ticket, and how much of it reached Redmine, now shows on screens you already use. There's no new screen.
1h 20m.What the total counts
owedMinutes), so the chip matches Redmine before and after you send. Time not sent yet counts, since it can still be sent. Time logged while a ticket wasn't linked stays exact.Timesheet source filter
How it works
redmine-receipts.js,redmine-receipts-core.js). These work out, for each closed session, how much of its Redmine issue-day was sent. They use the sameredmineTicketDaysFor,pushLedgerForandunsentTotalsas the Send dialog, so the two always agree. A receipt is{ issueId, date, url, entries: [{ id, hours }], discarded, unsentSeconds }.urlis Redmine's spent-time list filtered to the issue, the day and the caller (/time_entries?set_filter=1&issue_id=…&user_id=me&spent_on=…). Receipts come back only to someone with a Redmine account, for their own time, and on the timesheet only for their own sheet.timers.getTicketTotals({ tickets: [{ source, ticketId }] })(new). Returns totals keyedsource:ticketId, for up to 500 tickets per call; the client splits longer lists. A source without timers (GitHub, for now) is skipped, not refused. A ticket with nothing left to show has no entry.timers.getTicketTotal. Now counts the same way as the list, so a row's chip and its page header agree.roundedIssueSecondscovers Redmine issues.linkedSendAdjustmentcovers linked Huddle tickets: it's added to their exact time, and is negative where time was marked Never send.roundingStepsFor,pushLedgerForand the sharedowedDaySeconds/owedMinutesinredmine-time-entries.js.ownRedmineOnlyByIssue).user_id=me, up to 5 pages), cached for 5 minutes.tickets:refetch(refreshTicketTimes), which the rows, the ticket page and its Activity already reload on.formatLoggedTimehides the total below 60 seconds on the row chip, the header badge and the Resume label, rather than showing "0m".wrapUpTimes.ts). On clock-out, each linked ticket in the wrap-up post gets its session time appended (sessionSecondsByTicket,withTicketTimes), counting a running stint up to the clock-out.timers.getTicketSessionsandclock.timesheet. Their ticket sessions now includeredmine. The timesheet's ticket sessions also includedateandredmineIssueId.timesheetSources.ts,TimesheetSourceFilter.tsx). Built from@mieweb/uiDropdown,DropdownItemand a ghostButton. Each choice is amenuitemcheckbox.ticketApi.getTotal, and the "Stop timer" label the ticket page no longer shows.Known limits
Release note
Added to
release-notes/1.3.0.mdunder "See the time you've logged on each ticket", with a line for #920 in the pull request list.Tests
redmine-receipts-core.test.ts,redmineReceipt.test.ts,shiftTicketRows.test.ts,timesheetSources.test.ts,TimesheetSourceFilter.test.tsxandwrapUpTimes.test.ts.activityEntries.test.ts,TimesheetRow.test.tsx,redmine-time-entries.test.ts(owedDaySeconds) andtimeUtils.test.ts(formatLoggedTime).timers.test.tscoversgetTicketTotals: scoped to the caller, a Redmine issue including its linked ticket's time, a GitHub ticket skipped, and a missing list refused.ticket-totals-redmine.test.ts(new) runs against a stand-in Redmine. It covers days rounded as a send rounds them, time logged only in Redmine added without counting a sent entry twice, time marked Never send left out, and a row and its ticket page agreeing.tests/e2e/timers/ticket-time-log.spec.tscovers the header badge and Resume label, the Activity receipt and its View in Redmine link, and the timesheet ticket rows. The full suite was run locally, and every failure from that run passes on its own.main: none of their errors are in files this PR changes.🤖 Generated with Claude Code