You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/services/issue
Giteabot a014d071e4
Rework suggestion backend (#33538) (#33546)
Backport #33538 by @lunny

Fix #33522 

The suggestion backend logic now is

- If the keyword is empty, returned the latest 5 issues/prs with index
desc order
- If the keyword is digital, find all issues/prs which `index` has a
prefix with that, with index asc order
- If the keyword is non-digital or if the queried records less than 5,
searching issues/prs title with a `like`, with index desc order

## Empty keyword
<img width="310" alt="image"
src="https://github.com/user-attachments/assets/1912c634-0d98-4eeb-8542-d54240901f77"
/>

## Digital
<img width="479" alt="image"
src="https://github.com/user-attachments/assets/0356a936-7110-4a24-b21e-7400201bf9b8"
/>

## Digital and title contains the digital
<img width="363" alt="image"
src="https://github.com/user-attachments/assets/6e12f908-28fe-48de-8ccc-09cbeab024d4"
/>

## non-Digital
<img width="435" alt="image"
src="https://github.com/user-attachments/assets/2722bb53-baa2-4d67-a224-522a65f73856"
/>
<img width="477" alt="image"
src="https://github.com/user-attachments/assets/06708dd9-80d1-4a88-b32b-d29072dd1ba6"
/>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 weeks ago
..
assignee.go Fix get reviewers' bug (#32415) 3 months ago
assignee_test.go Performance improvements for pull request list API (#30490) 9 months ago
comments.go Prevent simultaneous editing of comments and issues (#31053) 9 months ago
commit.go Enable more `revive` linter rules (#30608) 10 months ago
commit_test.go Replace 'userxx' with 'orgxx' in all test files when the user type is org (#27052) 1 year ago
content.go Prevent simultaneous editing of comments and issues (#31053) 9 months ago
issue.go Issue time estimate, meaningful time tracking (#23113) 3 months ago
issue_test.go Penultimate round of `db.DefaultContext` refactor (#27414) 1 year ago
label.go Penultimate round of `db.DefaultContext` refactor (#27414) 1 year ago
label_test.go Next round of `db.DefaultContext` refactor (#27089) 1 year ago
main_test.go Move AddCollabrator and CreateRepositoryByExample to service layer (#32419) 4 months ago
milestone.go demilestone should not include milestone (#32923) (#32979) 2 months ago
milestone_test.go demilestone should not include milestone (#32923) (#32979) 2 months ago
pull.go Update misspell to 0.5.1 and add `misspellings.csv` (#30573) 10 months ago
reaction.go Add user blocking (#29028) 12 months ago
reaction_test.go Add user blocking (#29028) 12 months ago
status.go Fix 500 error when `state` params is set when editing issue/PR by API (#31880) 6 months ago
suggestion.go Rework suggestion backend (#33538) (#33546) 2 weeks ago
suggestion_test.go Rework suggestion backend (#33538) (#33546) 2 weeks ago
template.go refactor: remove redundant err declarations (#32381) 4 months ago