grim/youtrack-import

Parents a2fccfd52984
Children 32f4ce286b50
Mention that a previously edited comment was discarded and don't display the old value. YI-37
--- a/trac/tickets.go Mon Aug 03 22:19:58 2020 -0500
+++ b/trac/tickets.go Mon Aug 03 23:07:21 2020 -0500
@@ -246,12 +246,16 @@
fieldName = "Assignee"
}
- text = fmt.Sprintf(
- "%s: %s ⟶ %s\n",
- fieldName,
- oldValue,
- newValue,
- )
+ if strings.HasPrefix(change.Field, "_comment") {
+ text = "*previously edited comment discarded*"
+ } else {
+ text = fmt.Sprintf(
+ "%s: %s ⟶ %s\n",
+ fieldName,
+ oldValue,
+ newValue,
+ )
+ }
}
comment.Text += text