diff --git a/pkg/web/templates/bug.html b/pkg/web/templates/bug.html index 5a015d3e989d87d5bacda4051bdc29c2b7061e31..749ce77ec7994f184cf600dd15600cb69a19a9ad 100644 --- a/pkg/web/templates/bug.html +++ b/pkg/web/templates/bug.html @@ -58,7 +58,7 @@ {{else if eq .Type "title"}}
-

{{if .AuthorAvatar}}{{end}}{{.Author}} changed the title to {{.Title}}

+

{{if .AuthorAvatar}}{{end}}{{.Author}} changed the title from {{.PreviousTitle}} to {{.Title}}

{{else if eq .Type "status"}} diff --git a/pkg/web/webui_bugs.go b/pkg/web/webui_bugs.go index 1a9554cbf0b76bf413fd3c0fd23ee2d52e338176..58d8d68b8437c51d4ca3619bb79647e013560644 100644 --- a/pkg/web/webui_bugs.go +++ b/pkg/web/webui_bugs.go @@ -68,6 +68,7 @@ type TimelineItem struct { Message template.HTML Title string + PreviousTitle string Status string AddedLabels []Label RemovedLabels []Label @@ -237,12 +238,13 @@ func buildTimelineItems(snap *bug.Snapshot) []TimelineItem { case *bug.SetTitleTimelineItem: items = append(items, TimelineItem{ - Type: "title", - ID: op.CombinedId().String(), - Author: op.Author.DisplayName(), - AuthorAvatar: op.Author.AvatarUrl(), - Timestamp: op.UnixTime.Time(), - Title: op.Title, + Type: "title", + ID: op.CombinedId().String(), + Author: op.Author.DisplayName(), + AuthorAvatar: op.Author.AvatarUrl(), + Timestamp: op.UnixTime.Time(), + Title: op.Title, + PreviousTitle: op.Was, }) case *bug.SetStatusTimelineItem: