@@ -1928,26 +1928,38 @@ func (issue *Issue) getParticipantIDsByIssue(e db.Engine) ([]int64, error) {
19281928
19291929// Get Blocked By Dependencies, aka all issues this issue is blocked by.
19301930func (issue * Issue ) getBlockedByDependencies (e db.Engine ) (issueDeps []* DependencyInfo , err error ) {
1931- return issueDeps , e .
1931+ err = e .
19321932 Table ("issue" ).
19331933 Join ("INNER" , "repository" , "repository.id = issue.repo_id" ).
19341934 Join ("INNER" , "issue_dependency" , "issue_dependency.dependency_id = issue.id" ).
19351935 Where ("issue_id = ?" , issue .ID ).
19361936 // sort by repo id then created date, with the issues of the same repo at the beginning of the list
19371937 OrderBy ("CASE WHEN issue.repo_id = " + strconv .FormatInt (issue .RepoID , 10 ) + " THEN 0 ELSE issue.repo_id END, issue.created_unix DESC" ).
19381938 Find (& issueDeps )
1939+
1940+ for _ , depInfo := range issueDeps {
1941+ depInfo .Issue .Repo = & depInfo .Repository
1942+ }
1943+
1944+ return issueDeps , err
19391945}
19401946
19411947// Get Blocking Dependencies, aka all issues this issue blocks.
19421948func (issue * Issue ) getBlockingDependencies (e db.Engine ) (issueDeps []* DependencyInfo , err error ) {
1943- return issueDeps , e .
1949+ err = e .
19441950 Table ("issue" ).
19451951 Join ("INNER" , "repository" , "repository.id = issue.repo_id" ).
19461952 Join ("INNER" , "issue_dependency" , "issue_dependency.issue_id = issue.id" ).
19471953 Where ("dependency_id = ?" , issue .ID ).
19481954 // sort by repo id then created date, with the issues of the same repo at the beginning of the list
19491955 OrderBy ("CASE WHEN issue.repo_id = " + strconv .FormatInt (issue .RepoID , 10 ) + " THEN 0 ELSE issue.repo_id END, issue.created_unix DESC" ).
19501956 Find (& issueDeps )
1957+
1958+ for _ , depInfo := range issueDeps {
1959+ depInfo .Issue .Repo = & depInfo .Repository
1960+ }
1961+
1962+ return issueDeps , err
19511963}
19521964
19531965// BlockedByDependencies finds all Dependencies an issue is blocked by
0 commit comments