1
0
Fork 0
forked from forgejo/forgejo

Working on issue and install page

This commit is contained in:
Unknown 2014-03-27 16:31:32 -04:00
parent f76eb8a666
commit 34f4af9ebf
7 changed files with 118 additions and 34 deletions

View file

@ -136,6 +136,12 @@ func GetIssues(userId, repoId, posterId, milestoneId int64, page int, isClosed,
return issues, err
}
// GetUserIssueCount returns the number of issues that were created by given user in repository.
func GetUserIssueCount(userId, repoId int64) int64 {
count, _ := orm.Where("poster_id=?", userId).And("repo_id=?", repoId).Count(new(Issue))
return count
}
// UpdateIssue updates information of issue.
func UpdateIssue(issue *Issue) error {
_, err := orm.Id(issue.Id).AllCols().Update(issue)