aboutsummaryrefslogtreecommitdiffstats
path: root/bug
diff options
context:
space:
mode:
Diffstat (limited to 'bug')
-rw-r--r--bug/op_add_comment.go4
-rw-r--r--bug/operation_test.go1
-rw-r--r--bug/snapshot.go2
3 files changed, 1 insertions, 6 deletions
diff --git a/bug/op_add_comment.go b/bug/op_add_comment.go
index c19b9593..2d6fb21a 100644
--- a/bug/op_add_comment.go
+++ b/bug/op_add_comment.go
@@ -58,10 +58,6 @@ func (op *AddCommentOperation) Validate() error {
return err
}
- if text.Empty(op.Message) {
- return fmt.Errorf("message is empty")
- }
-
if !text.Safe(op.Message) {
return fmt.Errorf("message is not fully printable")
}
diff --git a/bug/operation_test.go b/bug/operation_test.go
index 9296e247..255d6d98 100644
--- a/bug/operation_test.go
+++ b/bug/operation_test.go
@@ -47,7 +47,6 @@ func TestValidate(t *testing.T) {
NewSetTitleOp(rene, unix, "title", "multi\nline"),
NewSetTitleOp(rene, unix, "title\u001b", "title2"),
NewSetTitleOp(rene, unix, "title", "title2\u001b"),
- NewAddCommentOp(rene, unix, "", nil),
NewAddCommentOp(rene, unix, "message\u001b", nil),
NewAddCommentOp(rene, unix, "message", []git.Hash{git.Hash("invalid")}),
NewSetStatusOp(rene, unix, 1000),
diff --git a/bug/snapshot.go b/bug/snapshot.go
index 1004b625..72e673d4 100644
--- a/bug/snapshot.go
+++ b/bug/snapshot.go
@@ -30,7 +30,7 @@ func (snap *Snapshot) Id() string {
// Return the Bug identifier truncated for human consumption
func (snap *Snapshot) HumanId() string {
- return fmt.Sprintf("%.8s", snap.id)
+ return FormatHumanID(snap.id)
}
// Deprecated:should be moved in UI code