forgejo/models
Gusted 331fa44956
[BUG] Ensure HasIssueContentHistory takes into account comment_id
- The content history table contains the content history of issues and
comments. For issues they are saved with an comment id of zero.
- If you want to check if the issue has an content history, it should
take into account that SQL has `comment_id = 0`, as it otherwise could
return incorrect results when for example the issue already has an
comment that has an content history.
- Fix the code of `HasIssueContentHistory` to take this into account, it
relied on XORM to generate the SQL from the non-default values of the
struct, this wouldn't generate the `comment_id = 0` SQL as `0` is the
default value of an integer.
- Remove an unncessary log (it's not the responsibility of `models`
code to do logging).
- Adds unit test.
- Resolves #2513
2024-02-29 18:23:06 +01:00
..
actions Artifact deletion in actions ui (#27172) 2024-02-23 09:06:14 +01:00
activities
admin
asymkey
auth
avatars
db feat(xorm): add max idle time setting for db connections (#2418) 2024-02-21 12:17:16 +00:00
dbfs
fixtures Allow non-admin users to delete review requests (#29057) 2024-02-26 22:30:27 +01:00
forgejo/semver
forgejo_migrations
git Start to migrate from util.OptionalBool to optional.Option[bool] (#29329) 2024-02-26 22:30:26 +01:00
issues [BUG] Ensure HasIssueContentHistory takes into account comment_id 2024-02-29 18:23:06 +01:00
migrations
organization
packages
perm Users with read permission of pull requests can be assigned too (#27263) 2024-02-26 22:30:27 +01:00
project
pull
repo Users with read permission of pull requests can be assigned too (#27263) 2024-02-26 22:30:27 +01:00
secret
shared/types Refactor locale&string&template related code (#29165) 2024-02-16 15:20:52 +01:00
system
unit
unittest Workaround to clean up old reviews on creating a new one (#28554) 2024-02-26 21:42:14 +01:00
user Allow non-admin users to delete review requests (#29057) 2024-02-26 22:30:27 +01:00
webhook
error.go
fixture_generation.go
fixture_test.go
main_test.go
org.go
org_team.go
org_team_test.go
org_test.go
repo.go
repo_test.go
repo_transfer.go
repo_transfer_test.go