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.
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>
1 year ago
..
actions Support downloading raw task logs (#24451) 1 year ago
setting Replace `interface{}` with `any` (#25686) 1 year ago
activity.go Implement FSFE REUSE for golang files (#21840) 2 years ago
attachment.go Less naked returns (#25713) 1 year ago
blame.go Sort repo topic labels by name (#24123) 1 year ago
branch.go Replace `interface{}` with `any` (#25686) 1 year ago
cherry_pick.go Sync branches into databases (#22743) 1 year ago
commit.go Pass 'not' to commit count (#24473) 1 year ago
compare.go Sync branches into databases (#22743) 1 year ago
download.go Less naked returns (#25713) 1 year ago
editor.go Replace `interface{}` with `any` (#25686) 1 year ago
editor_test.go Refactor web package and context package (#25298) 1 year ago
find.go Implement FSFE REUSE for golang files (#21840) 2 years ago
helper.go Add actor and status dropdowns to run list (#25118) 1 year ago
helper_test.go Add actor and status dropdowns to run list (#25118) 1 year ago
http.go Less naked returns (#25713) 1 year ago
http_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
issue.go For API attachments, use API URL (#25639) 1 year ago
issue_content_history.go Check `ctx.Written()` for `GetActionIssue` (#25698) 1 year ago
issue_dependency.go Add API to manage issue dependencies (#17935) 1 year ago
issue_label.go Replace `interface{}` with `any` (#25686) 1 year ago
issue_label_test.go Refactor web package and context package (#25298) 1 year ago
issue_lock.go Use fetch form action for lock/unlock/pin/unpin on sidebar (#25380) 1 year ago
issue_pin.go Check `ctx.Written()` for `GetActionIssue` (#25698) 1 year ago
issue_stopwatch.go Speed up HasUserStopwatch & GetActiveStopwatch (#23051) 1 year ago
issue_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
issue_timetrack.go Fix improper HTMLURL usages in Go code (#22839) 1 year ago
issue_watch.go Rewrite logger system (#24726) 1 year ago
main_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
middlewares.go Show outdated comments in files changed tab (#24936) 1 year ago
migrate.go Make repo migration cancelable and fix various bugs (#24605) 1 year ago
milestone.go Replace `interface{}` with `any` (#25686) 1 year ago
packages.go Use dynamic package type list (#22263) 2 years ago
patch.go Sync branches into databases (#22743) 1 year ago
projects.go Fix empty project displayed in issue sidebar (#25802) 1 year ago
projects_test.go Refactor web package and context package (#25298) 1 year ago
pull.go Show edit title button on commits tab of PR, too (#25791) 1 year ago
pull_review.go Check `ctx.Written()` for `GetActionIssue` (#25698) 1 year ago
release.go Fix tags header and pretty format numbers (#25624) 1 year ago
release_test.go Refactor web package and context package (#25298) 1 year ago
render.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo.go Replace `interface{}` with `any` (#25686) 1 year ago
search.go Refactor indexer (#25174) 1 year ago
topic.go Replace `interface{}` with `any` (#25686) 1 year ago
treelist.go Implement FSFE REUSE for golang files (#21840) 2 years ago
view.go Exclude default branch from pushed branch hint (#25795) 1 year ago
view_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
wiki.go Less naked returns (#25713) 1 year ago
wiki_test.go Replace `interface{}` with `any` (#25686) 1 year ago