]> source.dussan.org Git - gitea.git/commitdiff
exclude authored PRs from Review Requested filter (#14368)
authorJimmy Praet <jimmy.praet@telenet.be>
Mon, 18 Jan 2021 05:13:15 +0000 (06:13 +0100)
committerGitHub <noreply@github.com>
Mon, 18 Jan 2021 05:13:15 +0000 (07:13 +0200)
Co-authored-by: Lauris BH <lauris@nix.lv>
models/issue.go

index 3cd85dc6afcd86a6154fc154ca87c41218fbb3b5..1374f82fbd860e372599d0dda4d41f330db79cde 100644 (file)
@@ -1254,6 +1254,7 @@ func applyMentionedCondition(sess *xorm.Session, mentionedID int64) *xorm.Sessio
 
 func applyReviewRequestedCondition(sess *xorm.Session, reviewRequestedID int64) *xorm.Session {
        return sess.Join("INNER", []string{"review", "r"}, "issue.id = r.issue_id").
+               And("issue.poster_id <> ?", reviewRequestedID).
                And("r.type = ?", ReviewTypeRequest).
                And("r.reviewer_id = ? and r.id in (select max(id) from review where issue_id = r.issue_id and reviewer_id = r.reviewer_id and type in (?, ?, ?))"+
                        " or r.reviewer_team_id in (select team_id from team_user where uid = ?)",