Open Issue Count Shown On Tab

I moved my Jira databse to gitea. I wrote some scripts to manually enter items in the issue table. Everything seems to be working fine with the exception of the issue count on the “Issues” tab. I have 76 open issues in the database, but the count shown is 4. I am using version 1.16.6.

I think we have a ./gitea doctor could help you detect the problem and fix it.

I am using mysql. I rebuilt the indexes on the database. Now the value on the tab is a negative number.

Looking at the code, seems the NumOpenIssues calculation is bad because, most likely, the repo.NumIssues field is not correct on line 211 of models/repo/repo.go.

repo.NumOpenIssues = repo.NumIssues - repo.NumClosedIssues

I’m still learning how all this code is organized, so I can fully trace.

Solved: The num_issues field in the repository table is not correct. I manually updated. However, trying to figure out how the “repoStatsCorrectNum” function is called. Seems there are functions to update those fields to the correct values.

1 Like