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

Proposal: Pin Issues #2175

Closed
kolaente opened this issue Jul 17, 2017 · 12 comments · Fixed by #24406
Closed

Proposal: Pin Issues #2175

kolaente opened this issue Jul 17, 2017 · 12 comments · Fixed by #24406
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@kolaente
Copy link
Member

kolaente commented Jul 17, 2017

I don't know if this is overkill or if there is a better solution, but i'd like to have the abililty to pin issues to have them sticking at the top of the issues page.

This could be useful for general information you don't want to put in the readme or issues everyone in the team should comment.

More Context:
I'm currently working on a project with a bunch of other people. We don't know each other, so someone opened an "introduce yourself"-issue. But now we have so many issues that this one is already on the second page, so noone recognizes it anymore and until now, only two people introduced themselves.

@lunny lunny added in progress type/proposal The new feature has not been accepted yet but needs to be discussed first. type/feature Completely new functionality. Can only be merged if feature freeze is not active. labels Jul 18, 2017
@lunny lunny modified the milestones: 1.3.0, 1.x.x Jul 18, 2017
@sapk
Copy link
Member

sapk commented Jul 27, 2017

This could be implemented by a default label like pinned or on top. This would not change a lot of code and let people remove the default tag if they want. And without a sort applyed they should be display on top.

@lunny lunny removed the in progress label Jul 27, 2017
@bkcsoft
Copy link
Member

bkcsoft commented Aug 24, 2017

Adding Issue Priority and being able to sort on that would make more sense to me. Anyone else?

@lunny
Copy link
Member

lunny commented Aug 24, 2017

@bkcsoft Yes, a priority in database column, but we could also has a button to pin it.

@daviian
Copy link
Member

daviian commented Aug 24, 2017

@bkcsoft @lunny The pin button has the advantage that the issues are still sorted by date and pinned issues only appear above.

@lunny
Copy link
Member

lunny commented Aug 25, 2017

@daviian Yes. I mean, we only need to add one column priority to implement it. We can add an order SQL before all other order

order by `priority` desc,  ...

When you pin an issue, we will set the issue's priority as max priority + 10 , and when you unpin it, we could set priority = 0

@kolaente
Copy link
Member Author

@lunny i like the idea. Also priority would be a cool feature 😀 (but wouldn't this be a seperate issue?)

@BetaCat0
Copy link
Member

BetaCat0 commented Aug 28, 2018

I've been working on it :)

@adelowo adelowo mentioned this issue Nov 4, 2018
@6543

This comment was marked as duplicate.

@tautf

This comment was marked as duplicate.

@ivancxj

This comment was marked as duplicate.

@mpeter50
Copy link
Contributor

mpeter50 commented Nov 24, 2022

When you pin an issue, we will set the issue's priority as max priority + 10 , and when you unpin it, we could set priority = 0
// lunny

Implementing these 2 features with a single additional column may be more optimal, but this way on unpinning the priority cannot be restored to its old value.

@stuzer05
Copy link

stuzer05 commented Mar 5, 2023

More Context: I'm currently working on a project with a bunch of other people. We don't know each other, so someone opened an "introduce yourself"-issue. But now we have so many issues that this one is already on the second page, so noone recognizes it anymore and until now, only two people introduced themselves.

Why not use wiki for that?

@lunny lunny removed this from the 1.x.x milestone Mar 20, 2023
silverwind added a commit that referenced this issue May 25, 2023
This adds the ability to pin important Issues and Pull Requests. You can
also move pinned Issues around to change their Position. Resolves #2175.

## Screenshots

![grafik](https://user-images.githubusercontent.com/15185051/235123207-0aa39869-bb48-45c3-abe2-ba1e836046ec.png)

![grafik](https://user-images.githubusercontent.com/15185051/235123297-152a16ea-a857-451d-9a42-61f2cd54dd75.png)

![grafik](https://user-images.githubusercontent.com/15185051/235640782-cbfe25ec-6254-479a-a3de-133e585d7a2d.png)

The Design was mostly copied from the Projects Board.

## Implementation
This uses a new `pin_order` Column in the `issue` table. If the value is
set to 0, the Issue is not pinned. If it's set to a bigger value, the
value is the Position. 1 means it's the first pinned Issue, 2 means it's
the second one etc. This is dived into Issues and Pull requests for each
Repo.

## TODO
- [x] You can currently pin as many Issues as you want. Maybe we should
add a Limit, which is configurable. GitHub uses 3, but I prefer 6, as
this is better for bigger Projects, but I'm open for suggestions.
- [x] Pin and Unpin events need to be added to the Issue history.
- [x] Tests
- [x] Migration

**The feature itself is currently fully working, so tester who may find
weird edge cases are very welcome!**

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Giteabot <teabot@gitea.io>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.