1
0
Fork 0
forked from forgejo/forgejo

Show total TrackedTime on issue/pull/milestone lists (#26672)

TODOs:
- [x] write test for `GetIssueTotalTrackedTime`
- [x] frontport kitharas template changes and make them mobile-friendly

---

![image](6713da97-201f-4217-8588-4c4cec157171)

![image](3a45aba8-26b5-4e6a-b97d-68bfc2bf9024)

---
*Sponsored by Kithara Software GmbH*
This commit is contained in:
6543 2023-10-19 16:08:31 +02:00 committed by GitHub
parent e83f2cbbac
commit adbc995c34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 129 additions and 36 deletions

View file

@ -115,3 +115,15 @@ func TestTotalTimesForEachUser(t *testing.T) {
assert.NoError(t, err)
assert.Len(t, total, 2)
}
func TestGetIssueTotalTrackedTime(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
ttt, err := issues_model.GetIssueTotalTrackedTime(db.DefaultContext, &issues_model.IssuesOptions{MilestoneIDs: []int64{1}}, false)
assert.NoError(t, err)
assert.EqualValues(t, 3682, ttt)
ttt, err = issues_model.GetIssueTotalTrackedTime(db.DefaultContext, &issues_model.IssuesOptions{MilestoneIDs: []int64{1}}, true)
assert.NoError(t, err)
assert.EqualValues(t, 0, ttt)
}