···1928192819291929// Get Blocked By Dependencies, aka all issues this issue is blocked by.
19301930func (issue *Issue) getBlockedByDependencies(e db.Engine) (issueDeps []*DependencyInfo, err error) {
19311931- return issueDeps, e.
19311931+ 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").
···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)
19391939+19401940+ for _, depInfo := range issueDeps {
19411941+ depInfo.Issue.Repo = &depInfo.Repository
19421942+ }
19431943+19441944+ return issueDeps, err
19391945}
1940194619411947// Get Blocking Dependencies, aka all issues this issue blocks.
19421948func (issue *Issue) getBlockingDependencies(e db.Engine) (issueDeps []*DependencyInfo, err error) {
19431943- return issueDeps, e.
19491949+ 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").
···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)
19571957+19581958+ for _, depInfo := range issueDeps {
19591959+ depInfo.Issue.Repo = &depInfo.Repository
19601960+ }
19611961+19621962+ return issueDeps, err
19511963}
1952196419531965// BlockedByDependencies finds all Dependencies an issue is blocked by