mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-21 16:40:52 +00:00
fix: include activity needed for entire heatmap (#7893)
Problem: Only data from the past 365 days (31536000s) is loaded. However, on the activity heatmap, there are 53 cols, each is 7 rows, so squares for at most 371 days (32054400s) are on the heatmap. This results in a few blank squares on the very left side, despite activity. Solution: Simply changing 31536000s (365d) to 32054400s (371d) to load all the needed activity. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7893 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Reviewed-by: 0ko <0ko@noreply.codeberg.org> Co-authored-by: Granular9241 <granular9241@noreply.codeberg.org> Co-committed-by: Granular9241 <granular9241@noreply.codeberg.org>
This commit is contained in:
parent
f3294f0b2d
commit
7fb99379f6
3 changed files with 19 additions and 1 deletions
|
@ -54,6 +54,10 @@ func TestGetUserHeatmapDataByUser(t *testing.T) {
|
|||
"multiple actions performed with two grouped together",
|
||||
10, 10, 3, `[{"timestamp":1603009800,"contributions":1},{"timestamp":1603010700,"contributions":2}]`,
|
||||
},
|
||||
{
|
||||
"test cutoff within",
|
||||
40, 40, 1, `[{"timestamp":1577404800,"contributions":1}]`,
|
||||
},
|
||||
}
|
||||
// Prepare
|
||||
require.NoError(t, unittest.PrepareTestDatabase())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue