mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-06 21:45:50 +01:00
(refs #488)Displays the milestone on the issue list.
This commit is contained in:
@@ -116,7 +116,7 @@ trait IssuesService {
|
||||
*/
|
||||
def searchIssue(condition: IssueSearchCondition, filterUser: Map[String, String], onlyPullRequest: Boolean,
|
||||
offset: Int, limit: Int, repos: (String, String)*)
|
||||
(implicit s: Session): List[(Issue, List[Label], Int)] = {
|
||||
(implicit s: Session): List[(Issue, List[Label], Option[String], Int)] = {
|
||||
|
||||
// get issues and comment count and labels
|
||||
searchIssueQuery(repos, condition, filterUser, onlyPullRequest)
|
||||
@@ -136,8 +136,9 @@ trait IssuesService {
|
||||
.drop(offset).take(limit)
|
||||
.leftJoin (IssueLabels) .on { case ((t1, t2), t3) => t1.byIssue(t3.userName, t3.repositoryName, t3.issueId) }
|
||||
.leftJoin (Labels) .on { case (((t1, t2), t3), t4) => t3.byLabel(t4.userName, t4.repositoryName, t4.labelId) }
|
||||
.map { case (((t1, t2), t3), t4) =>
|
||||
(t1, t2.commentCount, t4.labelId.?, t4.labelName.?, t4.color.?)
|
||||
.leftJoin (Milestones) .on { case ((((t1, t2), t3), t4), t5) => t1.byMilestone(t5.userName, t5.repositoryName, t5.milestoneId) }
|
||||
.map { case ((((t1, t2), t3), t4), t5) =>
|
||||
(t1, t2.commentCount, t4.labelId.?, t4.labelName.?, t4.color.?, t5.title.?)
|
||||
}
|
||||
.list
|
||||
.splitWith { (c1, c2) =>
|
||||
@@ -146,11 +147,12 @@ trait IssuesService {
|
||||
c1._1.issueId == c2._1.issueId
|
||||
}
|
||||
.map { issues => issues.head match {
|
||||
case (issue, commentCount, _,_,_) =>
|
||||
case (issue, commentCount, _, _, _, milestone) =>
|
||||
(issue,
|
||||
issues.flatMap { t => t._3.map (
|
||||
Label(issue.userName, issue.repositoryName, _, t._4.get, t._5.get)
|
||||
)} toList,
|
||||
milestone,
|
||||
commentCount)
|
||||
}} toList
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@(issues: List[(model.Issue, List[model.Label], Int)],
|
||||
@(issues: List[(model.Issue, List[model.Label], Option[String], Int)],
|
||||
page: Int,
|
||||
openCount: Int,
|
||||
closedCount: Int,
|
||||
@@ -135,7 +135,7 @@
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
@issues.map { case (issue, labels, commentCount) =>
|
||||
@issues.map { case (issue, labels, milestone, commentCount) =>
|
||||
<tr>
|
||||
<td>
|
||||
@if(hasWritePermission){
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@(issues: List[(model.Issue, List[model.Label], Int)],
|
||||
@(issues: List[(model.Issue, List[model.Label], Option[String], Int)],
|
||||
page: Int,
|
||||
openCount: Int,
|
||||
closedCount: Int,
|
||||
@@ -71,7 +71,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@issues.map { case (issue, labels, commentCount) =>
|
||||
@issues.map { case (issue, labels, milestone, commentCount) =>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="@assets/common/images/pullreq-@(if(issue.closed) "closed" else "open").png"/>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@(issues: List[(model.Issue, List[model.Label], Int)],
|
||||
@(issues: List[(model.Issue, List[model.Label], Option[String], Int)],
|
||||
page: Int,
|
||||
collaborators: List[String],
|
||||
milestones: List[model.Milestone],
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@(issues: List[(model.Issue, List[model.Label], Int)],
|
||||
@(issues: List[(model.Issue, List[model.Label], Option[String], Int)],
|
||||
page: Int,
|
||||
openCount: Int,
|
||||
closedCount: Int,
|
||||
@@ -146,7 +146,7 @@
|
||||
}
|
||||
*@
|
||||
}
|
||||
@issues.map { case (issue, labels, commentCount) =>
|
||||
@issues.map { case (issue, labels, milestone, commentCount) =>
|
||||
<tr>
|
||||
<td style="padding-top: 15px; padding-bottom: 15px;">
|
||||
@if(hasWritePermission){
|
||||
@@ -177,6 +177,7 @@
|
||||
</span>
|
||||
<div class="small muted" style="margin-left: 40px; margin-top: 5px;">
|
||||
#@issue.issueId opened by @user(issue.openedUserName, styleClass="username") @datetime(issue.registeredDate)
|
||||
<span style="margin: 20px;"><a href="@condition.copy(milestoneId = Some(Some(1))).toURL" class="username">@milestone</a></span>
|
||||
</div>
|
||||
@if(hasWritePermission){
|
||||
</label>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@(issues: List[(model.Issue, List[model.Label], Int)],
|
||||
@(issues: List[(model.Issue, List[model.Label], Option[String], Int)],
|
||||
counts: List[service.PullRequestService.PullRequestCount],
|
||||
filter: Option[String],
|
||||
page: Int,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@(issues: List[(model.Issue, List[model.Label], Int)],
|
||||
@(issues: List[(model.Issue, List[model.Label], Option[String], Int)],
|
||||
page: Int,
|
||||
openCount: Int,
|
||||
closedCount: Int,
|
||||
@@ -71,7 +71,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@issues.map { case (issue, labels, commentCount) =>
|
||||
@issues.map { case (issue, labels, milestone, commentCount) =>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="@assets/common/images/pullreq-@(if(issue.closed) "closed" else "open").png"/>
|
||||
|
||||
Reference in New Issue
Block a user