Skip to content
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

Merged

Conversation

adelowo
Copy link
Member

@adelowo adelowo commented Oct 9, 2018

Fixes #3114

@bkcsoft bkcsoft added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Oct 9, 2018
@techknowlogick techknowlogick added this to the 1.7.0 milestone Oct 9, 2018
@bkcsoft bkcsoft added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Oct 9, 2018
@techknowlogick techknowlogick added the topic/ui Change the appearance of the Gitea UI label Oct 9, 2018
@codecov-io
Copy link

codecov-io commented Oct 9, 2018

Codecov Report

Merging #5051 into master will increase coverage by 0.03%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
routers/api/v1/repo/milestone.go 0% <0%> (ø) ⬆️
models/issue_milestone.go 57.86% <100%> (+0.13%) ⬆️
modules/process/manager.go 76.81% <0%> (-4.35%) ⬇️
models/repo_indexer.go 50% <0%> (+5.5%) ⬆️
modules/indexer/repo.go 69.84% <0%> (+5.55%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d9b0b7f...e13447f. Read the comment docs.

models/issue_milestone.go Outdated Show resolved Hide resolved
models/issue_milestone.go Outdated Show resolved Hide resolved
@lunny lunny added the pr/breaking Merging this PR means builds will break. Needs a description what exactly breaks, and how to fix it! label Oct 10, 2018
@adelowo
Copy link
Member Author

adelowo commented Oct 11, 2018

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

package github.com/golang/lint/golint: code in directory /go/src/github.com/golang/lint/golint expects import "golang.org/x/lint/golint"

make lint works locally though

@lunny
Copy link
Member

lunny commented Oct 12, 2018

don't merge until v1.6 branched.

models/issue_milestone.go Outdated Show resolved Hide resolved
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)
Copy link
Member

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

Copy link
Member Author

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.........

Copy link
Member

@lafriks lafriks Oct 14, 2018

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")

@adelowo adelowo force-pushed the dont_show_closed_milestone_on_issue_filter_page branch from bf4f522 to b1510db Compare October 17, 2018 17:12
@techknowlogick
Copy link
Member

@lafriks please review changes.

@lafriks
Copy link
Member

lafriks commented Nov 26, 2018

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

@lunny
Copy link
Member

lunny commented Nov 26, 2018

@lafriks Another PR should add a state query parameter to do that. See https://developer.github.com/v3/issues/milestones/

@lunny lunny merged commit 5e022a9 into go-gitea:master Nov 26, 2018
@adelowo adelowo deleted the dont_show_closed_milestone_on_issue_filter_page branch November 28, 2018 09:41
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. pr/breaking Merging this PR means builds will break. Needs a description what exactly breaks, and how to fix it! topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

distinguish milestones on issues page (opened vs. closed)
7 participants