diff --git a/models/issue_comment.go b/models/issue_comment.go
index bc2b86a25..5f2f75dd3 100644
--- a/models/issue_comment.go
+++ b/models/issue_comment.go
@@ -96,6 +96,7 @@ type Comment struct {
OldAssignee *User `xorm:"-"`
OldTitle string
NewTitle string
+ DependentIssue int64
CommitID int64
Line int64
diff --git a/models/issue_dependency.go b/models/issue_dependency.go
index 95a4517b4..f8fbde232 100644
--- a/models/issue_dependency.go
+++ b/models/issue_dependency.go
@@ -6,7 +6,6 @@ package models
import (
"time"
- "strconv"
)
// IssueDependency is connection request for receiving issue notification.
@@ -77,17 +76,22 @@ func CreateIssueDependency(userID, issueID int64, depID int64) (err error, exist
IssueID: issueID,
PosterID: userID,
Type: CommentTypeAddedDependency,
- Content: strconv.FormatInt(depID, 10),
+ Content: issue.Title,
+ DependentIssue: depID,
}
if _, err := x.Insert(comment); err != nil {
return err, exists, false
}
+
+ var depIssue = Issue{}
+ _, err = x.Id(issueID).Get(&depIssue)
comment = &Comment{
IssueID: depID,
PosterID: userID,
Type: CommentTypeAddedDependency,
- Content: strconv.FormatInt(issueID, 10),
+ Content: depIssue.Title,
+ DependentIssue: issueID,
}
if _, err := x.Insert(comment); err != nil {
@@ -130,22 +134,28 @@ func RemoveIssueDependency(userID, issueID int64, depID int64, depType int64) (e
}
// Add comment referencing the removed dependency
+ var issue = Issue{}
+ _, err = x.Id(depID).Get(&issue)
comment := &Comment{
IssueID: issueID,
PosterID: userID,
Type: CommentTypeRemovedDependency,
- Content: strconv.FormatInt(depID, 10),
+ Content: issue.Title,
+ DependentIssue: depID,
}
if _, err := x.Insert(comment); err != nil {
return err
}
+ var depIssue = Issue{}
+ _, err = x.Id(issueID).Get(&depIssue)
comment = &Comment{
IssueID: depID,
PosterID: userID,
Type: CommentTypeRemovedDependency,
- Content: strconv.FormatInt(issueID, 10),
+ Content: depIssue.Title,
+ DependentIssue: issueID,
}
if _, err := x.Insert(comment); err != nil {
diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl
index b9ec76f66..6ea4439a2 100644
--- a/templates/repo/issue/view_content/sidebar.tmpl
+++ b/templates/repo/issue/view_content/sidebar.tmpl
@@ -197,7 +197,7 @@
{{.i18n.Tr "repo.issues.dependency.title"}}
{{if .BlockedByDependencies}}
- This issue is blocked by:
+ Closing this issue is blocked by: