forgejo/models/issues
yp05327 8b89563bf1
Fix empty project displayed in issue sidebar (#25802)
Before:

![image](https://github.com/go-gitea/gitea/assets/18380374/1ab476dc-2f9b-4c85-9e87-105fc73af1ee)
After:

![image](https://github.com/go-gitea/gitea/assets/18380374/786f984d-5c27-4eff-b3d9-159f68034ce4)

This issue comes from the change in #25468.
`LoadProject` will always return at least one record, so we use
`ProjectID` to check whether an issue is linked to a project in the old
code.
As other `issue.LoadXXX` functions, we need to check the return value
from `xorm.Session.Get`.

In recent unit tests, we only test `issueList.LoadAttributes()` but
don't test `issue.LoadAttributes()`. So I added a new test for
`issue.LoadAttributes()` in this PR.

---------

Co-authored-by: Denys Konovalov <privat@denyskon.de>
2023-07-12 16:10:35 +02:00
..
assignees.go
assignees_test.go
comment.go Update tool dependencies, lock govulncheck and actionlint (#25655) 2023-07-09 11:58:06 +00:00
comment_code.go Show outdated comments in files changed tab (#24936) 2023-06-21 16:08:12 +00:00
comment_list.go Update tool dependencies, lock govulncheck and actionlint (#25655) 2023-07-09 11:58:06 +00:00
comment_test.go Show outdated comments in files changed tab (#24936) 2023-06-21 16:08:12 +00:00
content_history.go
content_history_test.go
dependency.go
dependency_test.go
issue.go Update tool dependencies, lock govulncheck and actionlint (#25655) 2023-07-09 11:58:06 +00:00
issue_index.go
issue_label.go Update tool dependencies, lock govulncheck and actionlint (#25655) 2023-07-09 11:58:06 +00:00
issue_list.go Improve loadprojects for issue list (#25468) 2023-06-24 15:31:28 +00:00
issue_list_test.go Fix empty project displayed in issue sidebar (#25802) 2023-07-12 16:10:35 +02:00
issue_lock.go
issue_project.go Fix empty project displayed in issue sidebar (#25802) 2023-07-12 16:10:35 +02:00
issue_search.go Some refactors for issues stats (#24793) 2023-05-19 22:17:48 +08:00
issue_stats.go Fix 500 error when select No assignee filter in issue list page (#24854) 2023-05-22 13:08:27 +02:00
issue_test.go Fix empty project displayed in issue sidebar (#25802) 2023-07-12 16:10:35 +02:00
issue_update.go Update tool dependencies, lock govulncheck and actionlint (#25655) 2023-07-09 11:58:06 +00:00
issue_user.go
issue_user_test.go
issue_watch.go
issue_watch_test.go
issue_xref.go
issue_xref_test.go
label.go Some refactors for issues stats (#24793) 2023-05-19 22:17:48 +08:00
label_test.go Modify luminance calculation and extract related functions into single files (#24586) 2023-05-10 11:19:03 +00:00
main_test.go
milestone.go
milestone_test.go
pull.go Fix profile render when the README.md size is larger than 1024 bytes (#25131) 2023-06-13 09:02:25 +00:00
pull_list.go Remove duplicated issues options and some more refactors (#24787) 2023-05-18 10:45:25 +00:00
pull_test.go Fix duplicate Reviewed-by trailers (#24796) 2023-06-09 16:34:49 +02:00
reaction.go
reaction_test.go
review.go Update tool dependencies, lock govulncheck and actionlint (#25655) 2023-07-09 11:58:06 +00:00
review_test.go Fix duplicate Reviewed-by trailers (#24796) 2023-06-09 16:34:49 +02:00
stopwatch.go
stopwatch_test.go
tracked_time.go Update tool dependencies, lock govulncheck and actionlint (#25655) 2023-07-09 11:58:06 +00:00
tracked_time_test.go Store and use seconds for timeline time comments (#25392) 2023-06-23 12:12:39 +00:00