Skip to content

Conversation

@chippison
Copy link
Contributor

@chippison chippison commented Feb 1, 2026

Description

DEV-17057

We want to change the labeling in our Scheduled report for when to send the report.

fixes #21118

Checklist

  • [NA] I have understood, reviewed, and tested all AI outputs before use
  • [NA] All AI instructions respect security, IP, and privacy rules

Review

@chippison chippison modified the milestones: 5.7.1, 5.8.0 Feb 1, 2026
@chippison chippison marked this pull request as ready for review February 2, 2026 06:51
@chippison chippison requested a review from a team February 2, 2026 06:52
@chippison chippison requested review from sgiehl and tzi February 2, 2026 22:15
@chippison chippison requested a review from sgiehl February 5, 2026 02:31
Copy link
Member

@sgiehl sgiehl left a comment

Choose a reason for hiding this comment

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

Issues identified by Codex

Comment on lines 640 to 643
const reportHourFloat = parseFloat(reportHour);
const hours = Math.floor(reportHourFloat);
const paddedHour = `${hours}`.padStart(2, '0');
const reportHourUtcLabel = translate('ScheduledReports_ReportHourWithUtcOnly', [`${paddedHour}:00`]);
Copy link
Member

Choose a reason for hiding this comment

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

Incorrect UTC time formatting for half-hour offsets. reportHourUtc floors the hour and always formats :00, so 10.5 becomes 10:00 instead of 10:30. This is wrong for time zones like Asia/Kolkata.

Copy link
Contributor Author

@chippison chippison Feb 8, 2026

Choose a reason for hiding this comment

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

Hi @sgiehl ,
I saw this when reviewing from codex as well, but when I checked with what was happening in 5.x-dev, it was also not showing the minutes and just always the hours.

Like:

Choose 7:30 -> 22 o'clock

We also have code in reportHours that changes our selectbox to add '.5' to our selections so that we also ensure we choose something with 'xx:30' when we are in timezone with 'UTC+30'

if ((this.timeZoneDifferenceInHours * 2) % 2 !== 0) {
  hours.push({
    key: `${i}.5`,
    value: `${paddedHour}:30`,
  });
} else {
  hours.push({
    key: `${i}`,
    value: `${paddedHour}:00`,
  });
}

Meaning, if we have a timezone with UTC+30, we are forced to select '00:30, 01:30, etc' instead of '00:00, 01:00'

I thought that because of these, this was what it was intending to do and we always 'try' to send the report at the hour and not in 30 mins increment.

Caveat:
This will not work for UTC+45 timezones though, but after checking its only Nepal and Chatham Islands that seem to use this timezone, but let me know if we want to make changes so that we cover this edge case

await page.click('.entityTable tr:nth-child(11) button[title="Edit"]');
await page.waitForNetworkIdle();
expect(await page.evaluate(() => $('#reportHourHelpText').is(':visible'))).to.be.false;
});
Copy link
Member

Choose a reason for hiding this comment

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

UI test only checks visibility, not correctness of the UTC text. It won’t catch the half‑hour formatting bug.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added test for actual time when the timezone value is not UTC. If it is UTC, we do not check the time value since we just hide the help text anyway

@chippison chippison requested a review from sgiehl February 8, 2026 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

X o'clock UTC >> XX:00 UTC

3 participants