0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-02-14 14:53:17 +01:00
gitea/models/issues
Lunny Xiao 72518a8dab
Rework suggestion backend (#33538)
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: wxiaoguang <wxiaoguang@gmail.com>
2025-02-10 16:24:05 +00:00
..
assignees_test.go
assignees.go
comment_code.go
comment_list.go Some small refactors (#33144) 2025-01-10 06:00:06 +00:00
comment_test.go Fix issue comment number (#30556) 2024-12-30 14:35:46 -08:00
comment.go Fix unpin hint on the pinned pull requests (#33207) 2025-01-12 00:05:33 +00:00
content_history_test.go
content_history.go
dependency_test.go Use CloseIssue and ReopenIssue instead of ChangeStatus (#32467) 2024-12-25 07:38:30 +00:00
dependency.go
issue_index.go
issue_label_test.go
issue_label.go
issue_list_test.go
issue_list.go Some small refactors (#33144) 2025-01-10 06:00:06 +00:00
issue_lock.go
issue_project.go Fix unnecessary comment when moving issue on the same project column (#33496) 2025-02-05 11:51:10 +08:00
issue_search.go
issue_stats.go chore: fix some trivial problems and TODOs (#33473) 2025-02-02 18:16:56 +00:00
issue_test.go Enable tenv and testifylint rules (#32852) 2024-12-15 10:41:29 +00:00
issue_update.go Add missed transaction on setmerged (#33079) 2025-01-08 03:16:56 +00:00
issue_user_test.go Refactor tests (#33021) 2024-12-29 01:05:56 +00:00
issue_user.go
issue_watch_test.go Enable tenv and testifylint rules (#32852) 2024-12-15 10:41:29 +00:00
issue_watch.go
issue_xref_test.go Use CloseIssue and ReopenIssue instead of ChangeStatus (#32467) 2024-12-25 07:38:30 +00:00
issue_xref.go
issue.go Rework suggestion backend (#33538) 2025-02-10 16:24:05 +00:00
label_test.go Refactor tests (#33021) 2024-12-29 01:05:56 +00:00
label.go Support org labels when adding labels by label names (#32988) 2024-12-26 19:14:49 +00:00
main_test.go
milestone_list.go
milestone_test.go Enable tenv and testifylint rules (#32852) 2024-12-15 10:41:29 +00:00
milestone.go
pull_list_test.go Enable tenv and testifylint rules (#32852) 2024-12-15 10:41:29 +00:00
pull_list.go Automerge supports deleting branch automatically after merging (#32343) 2025-01-10 03:51:03 +08:00
pull_test.go Enable tenv and testifylint rules (#32852) 2024-12-15 10:41:29 +00:00
pull.go Add missed transaction on setmerged (#33079) 2025-01-08 03:16:56 +00:00
reaction.go Refactor user package (#33423) 2025-01-29 01:14:35 +02:00
review_list.go Filter reviews of one pull request in memory instead of database to reduce slow response because of lacking database index (#33106) 2025-01-07 10:50:09 +08:00
review_test.go Filter reviews of one pull request in memory instead of database to reduce slow response because of lacking database index (#33106) 2025-01-07 10:50:09 +08:00
review.go Hide/disable unusable UI elements when a repository is archived (#33459) 2025-01-31 20:47:31 +08:00
stopwatch_test.go Enable tenv and testifylint rules (#32852) 2024-12-15 10:41:29 +00:00
stopwatch.go Make tracked time representation display as hours (#33315) 2025-01-19 09:30:44 +08:00
tracked_time_test.go Enable tenv and testifylint rules (#32852) 2024-12-15 10:41:29 +00:00
tracked_time.go