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

Fix empty project displayed in issue sidebar (#25802) #25854

Merged
merged 1 commit into from
Jul 12, 2023

Commits on Jul 12, 2023

  1. Fix empty project displayed in issue sidebar (go-gitea#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 go-gitea#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 <[email protected]>
    2 people authored and GiteaBot committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    e873743 View commit details
    Browse the repository at this point in the history