-
-
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
Changes from 4 commits
75b850a
2a88140
b67a608
2877703
c80cbe7
4a7eec7
b1510db
4630a84
5454508
d2c81af
7e324d8
a514f05
e13447f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -178,10 +178,11 @@ func (milestones MilestoneList) getMilestoneIDs() []int64 { | |
return ids | ||
} | ||
|
||
// GetMilestonesByRepoID returns all milestones of a repository. | ||
// GetMilestonesByRepoID returns all opened milestones of a repository. | ||
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). | ||
adelowo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Asc("deadline_unix").Find(&miles) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
} | ||
|
||
// GetMilestones returns a list of milestones of given repository and status. | ||
|
Uh oh!
There was an error while loading. Please reload this page.