mirror of
https://github.com/go-gitea/gitea
synced 2025-07-16 07:18:37 +00:00
Make tracked time representation display as hours (#33315)
Estimated time represented in hours it might be convenient to have tracked time represented in the same way to be compared and managed. --------- Co-authored-by: Sysoev, Vladimir <i@vsysoev.ru> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
api "code.gitea.io/gitea/modules/structs"
|
||||
"code.gitea.io/gitea/modules/util"
|
||||
)
|
||||
|
||||
func ToIssue(ctx context.Context, doer *user_model.User, issue *issues_model.Issue) *api.Issue {
|
||||
@@ -186,7 +187,7 @@ func ToStopWatches(ctx context.Context, sws []*issues_model.Stopwatch) (api.Stop
|
||||
result = append(result, api.StopWatch{
|
||||
Created: sw.CreatedUnix.AsTime(),
|
||||
Seconds: sw.Seconds(),
|
||||
Duration: sw.Duration(),
|
||||
Duration: util.SecToHours(sw.Seconds()),
|
||||
IssueIndex: issue.Index,
|
||||
IssueTitle: issue.Title,
|
||||
RepoOwnerName: repo.OwnerName,
|
||||
|
Reference in New Issue
Block a user