mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-07 14:05:52 +01:00
Temporary fix for Slick 1.0.1.
Simple count query does not work on Slick 1.0.1 (but worked on Slick 1.0.0). Hmm...
This commit is contained in:
@@ -38,9 +38,10 @@ trait IssuesService {
|
|||||||
* @param userName the filter user name required for "assigned" and "created_by"
|
* @param userName the filter user name required for "assigned" and "created_by"
|
||||||
* @return the count of the search result
|
* @return the count of the search result
|
||||||
*/
|
*/
|
||||||
def countIssue(owner: String, repository: String, condition: IssueSearchCondition, filter: String, userName: Option[String]): Int =
|
def countIssue(owner: String, repository: String, condition: IssueSearchCondition, filter: String, userName: Option[String]): Int = {
|
||||||
searchIssueQuery(owner, repository, condition, filter, userName) map (_.length) first
|
// TODO It must be _.length instead of map (_.issueId) list).length. But it does not work on Slick 1.0.1 (worked on Slick 1.0.0).
|
||||||
|
(searchIssueQuery(owner, repository, condition, filter, userName) map (_.issueId) list).length
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Returns the Map which contains issue count for each labels.
|
* Returns the Map which contains issue count for each labels.
|
||||||
*
|
*
|
||||||
@@ -75,7 +76,8 @@ trait IssuesService {
|
|||||||
.map { case (labelName, t) =>
|
.map { case (labelName, t) =>
|
||||||
labelName ~ t.length
|
labelName ~ t.length
|
||||||
}
|
}
|
||||||
.list.toMap
|
.list
|
||||||
|
.toMap
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user