-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
show only opened milestones on issues page milestone filter #5051
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
show only opened milestones on issues page milestone filter #5051
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5051 +/- ##
==========================================
+ Coverage 37.45% 37.49% +0.03%
==========================================
Files 312 312
Lines 46509 46510 +1
==========================================
+ Hits 17421 17439 +18
+ Misses 26597 26580 -17
Partials 2491 2491
Continue to review full report at Codecov.
|
…show_closed_milestone_on_issue_filter_page
Any idea why Drone is failing, https://drone.gitea.io/go-gitea/gitea/3215/8 ? .. This is the same error I am encountering in #5073
|
don't merge until v1.6 branched. |
models/issue_milestone.go
Outdated
func GetMilestonesByRepoID(repoID int64) (MilestoneList, error) { | ||
miles := make([]*Milestone, 0, 10) | ||
return miles, x.Where("repo_id = ?", repoID).Asc("deadline_unix").Find(&miles) | ||
return miles, x.Where("repo_id = ? AND is_closed = ?", repoID, 0). | ||
Asc("deadline_unix").Find(&miles) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should sort by deadline and then also by id as deadline is optional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if I understand this.........
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Asc("deadline_unix").Asc("id")
bf4f522
to
b1510db
Compare
@lafriks please review changes. |
I don't like that there is now way to get all milestones in API but oh well it could be implemented properly in other PR |
@lafriks Another PR should add a |
Fixes #3114