aboutsummaryrefslogtreecommitdiffstats
path: root/bug/snapshot.go
diff options
context:
space:
mode:
Diffstat (limited to 'bug/snapshot.go')
-rw-r--r--bug/snapshot.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/bug/snapshot.go b/bug/snapshot.go
index 9229e7a1..75d3a028 100644
--- a/bug/snapshot.go
+++ b/bug/snapshot.go
@@ -7,11 +7,14 @@ import (
// Snapshot is a compiled form of the Bug data structure used for storage and merge
type Snapshot struct {
- id string
+ id string
+
Status Status
Title string
Comments []Comment
Labels []Label
+
+ Operations []Operation
}
// Return the Bug identifier
@@ -32,10 +35,11 @@ func (snap Snapshot) Summary() string {
)
}
+// Return the last time a bug was modified
func (snap Snapshot) LastEdit() time.Time {
- if len(snap.Comments) == 0 {
+ if len(snap.Operations) == 0 {
return time.Unix(0, 0)
}
- lastEditTimestamp := snap.Comments[len(snap.Comments)-1].Time
- return time.Unix(lastEditTimestamp, 0)
+
+ return snap.Operations[len(snap.Operations)-1].Time()
}