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

Improve milestone filter on issues page #22423

Merged
merged 19 commits into from
Apr 30, 2023
Merged

Conversation

lunny
Copy link
Member

@lunny lunny commented Jan 13, 2023

Now we have All milestones, No milestones, Open milestones and Closed milestones.
Fix #11924
Fix #22411

image

@lunny lunny added the type/enhancement An improvement of existing functionality label Jan 13, 2023
@lunny lunny added this to the 1.19.0 milestone Jan 13, 2023
@lunny lunny requested review from delvh and 6543 January 13, 2023 05:53
@codecov-commenter
Copy link

codecov-commenter commented Jan 13, 2023

Codecov Report

Merging #22423 (b13c0ed) into main (f521e88) will decrease coverage by 0.15%.
The diff coverage is 32.40%.

❗ Current head b13c0ed differs from pull request most recent head 3700af0. Consider uploading reports for the commit 3700af0 to get more accurate results

@@            Coverage Diff             @@
##             main   #22423      +/-   ##
==========================================
- Coverage   47.14%   46.99%   -0.15%     
==========================================
  Files        1149     1163      +14     
  Lines      151446   153767    +2321     
==========================================
+ Hits        71397    72265     +868     
- Misses      71611    72985    +1374     
- Partials     8438     8517      +79     
Impacted Files Coverage Δ
cmd/dump.go 0.66% <0.00%> (-0.01%) ⬇️
cmd/mailer.go 0.00% <0.00%> (ø)
cmd/manager.go 0.00% <0.00%> (ø)
cmd/manager_logging.go 0.00% <0.00%> (ø)
cmd/migrate_storage.go 5.76% <0.00%> (-0.12%) ⬇️
cmd/restore_repo.go 0.00% <0.00%> (ø)
cmd/web.go 0.00% <0.00%> (ø)
models/actions/run.go 1.63% <0.00%> (-0.10%) ⬇️
models/actions/runner.go 1.44% <ø> (ø)
models/db/search.go 100.00% <ø> (ø)
... and 63 more

... and 122 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 13, 2023
Copy link
Member

@jolheiser jolheiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor nit if we're going to change the translation keys anyways.

options/locale/locale_en-US.ini Outdated Show resolved Hide resolved
templates/repo/issue/list.tmpl Outdated Show resolved Hide resolved
routers/web/repo/issue.go Outdated Show resolved Hide resolved
routers/web/repo/issue.go Outdated Show resolved Hide resolved
templates/repo/issue/list.tmpl Outdated Show resolved Hide resolved
models/issues/issue.go Outdated Show resolved Hide resolved
templates/repo/issue/list.tmpl Outdated Show resolved Hide resolved
@lunny
Copy link
Member Author

lunny commented Jan 29, 2023

@delvh @jolheiser done.

@lunny lunny added type/bug outdated/backport/v1.18 This PR should be backported to Gitea 1.18 labels Jan 30, 2023
@delvh
Copy link
Member

delvh commented Jan 30, 2023

The other filters (project, label, …) don't have this yet, right?
They will get it in a later PR?

@lunny
Copy link
Member Author

lunny commented Jan 30, 2023

The other filters (project, label, …) don't have this yet, right? They will get it in a later PR?

I think there is already a PR for project, for label we can have another PR.

@delvh
Copy link
Member

delvh commented Jan 30, 2023

No, the project PR simply added the filter in the first place and omitted the No project and All projects filters.

@lunny
Copy link
Member Author

lunny commented Jan 31, 2023

No, the project PR simply added the filter in the first place and omitted the No project and All projects filters.

I mean #22640

@yardenshoham yardenshoham modified the milestones: 1.19.0, 1.20.0 Feb 22, 2023
@yardenshoham yardenshoham added the outdated/backport/v1.19 This PR should be backported to Gitea 1.19 label Feb 22, 2023
models/issues/issue.go Outdated Show resolved Hide resolved
models/issues/issue.go Outdated Show resolved Hide resolved
Comment on lines +1276 to +1277
if len(opts.MilestoneIDs) == 1 && opts.MilestoneIDs[0] == db.NoConditionID {
sess.And("issue.milestone_id = 0")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name NoConditionID looks really strange. When reading the code:

  1. The parameter is no-condition-ID
  2. The the next line adds a condition .....

Just a nit, just my opinion, not blocker.

@lunny lunny removed the outdated/backport/v1.18 This PR should be backported to Gitea 1.18 label Apr 10, 2023
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Apr 10, 2023
@GiteaBot GiteaBot 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 Apr 30, 2023
@6543 6543 added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 30, 2023
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 30, 2023
@6543 6543 enabled auto-merge (squash) April 30, 2023 12:30
@6543 6543 merged commit 3f0651d into go-gitea:main Apr 30, 2023
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Apr 30, 2023
Now we have `All milestones`, `No milestones`, `Open milestones` and
`Closed milestones`.
Fix go-gitea#11924
Fix go-gitea#22411 

<img width="1166" alt="image"
src="https://user-images.githubusercontent.com/81045/212243375-95eea035-a972-44b8-8088-53db614cb07e.png">
@GiteaBot GiteaBot added backport/done All backports for this PR have been created and removed reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. labels Apr 30, 2023
@lunny lunny deleted the lunny/milestone_filter branch April 30, 2023 13:18
silverwind pushed a commit that referenced this pull request Apr 30, 2023
Backport #22423 by @lunny

Now we have `All milestones`, `No milestones`, `Open milestones` and
`Closed milestones`.
Fix #11924
Fix #22411 

<img width="1166" alt="image"
src="https://user-images.githubusercontent.com/81045/212243375-95eea035-a972-44b8-8088-53db614cb07e.png">

Co-authored-by: Lunny Xiao <[email protected]>
Sh4kE added a commit to Sh4kE/k8s-projects that referenced this pull request May 7, 2023
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [gitea/gitea](https://github.com/go-gitea/gitea) | patch | `1.19.2-rootless` -> `1.19.3-rootless` |

---

### Release Notes

<details>
<summary>go-gitea/gitea</summary>

### [`v1.19.3`](https://github.com/go-gitea/gitea/blob/HEAD/CHANGELOG.md#&#8203;1193-httpsgithubcomgo-giteagiteareleasestag1193---2023-05-03)

[Compare Source](go-gitea/gitea@v1.19.2...v1.19.3)

-   SECURITY
    -   Use golang 1.20.4 to fix CVE-2023-24539, CVE-2023-24540, and CVE-2023-29400
-   ENHANCEMENTS
    -   Enable whitespace rendering on selection in Monaco ([#&#8203;24444](go-gitea/gitea#24444)) ([#&#8203;24485](go-gitea/gitea#24485))
    -   Improve milestone filter on issues page ([#&#8203;22423](go-gitea/gitea#22423)) ([#&#8203;24440](go-gitea/gitea#24440))
-   BUGFIXES
    -   Fix api error message if fork exists ([#&#8203;24487](go-gitea/gitea#24487)) ([#&#8203;24493](go-gitea/gitea#24493))
    -   Fix user-cards format ([#&#8203;24428](go-gitea/gitea#24428)) ([#&#8203;24431](go-gitea/gitea#24431))
    -   Fix incorrect CurrentUser check for docker rootless ([#&#8203;24435](go-gitea/gitea#24435))
    -   Getting the tag list does not require being signed in ([#&#8203;24413](go-gitea/gitea#24413)) ([#&#8203;24416](go-gitea/gitea#24416))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS42Ni4zIiwidXBkYXRlZEluVmVyIjoiMzUuNjYuMyIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: Michael Wittig <[email protected]>
Reviewed-on: https://gitea.sh4ke.rocks/sh4ke/k8s-projects/pulls/178
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Aug 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. outdated/backport/v1.19 This PR should be backported to Gitea 1.19 size/L Denotes a PR that changes 100-499 lines, ignoring generated files. type/bug type/enhancement An improvement of existing functionality
Projects
None yet
10 participants