forgejo/models/issues
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
..
assignees.go
assignees_test.go Remove deadcode under models/issues (#28536) 2023-12-19 20:12:02 +01:00
comment.go Add attachment support for code review comments (#29220) 2024-02-27 18:35:43 +00:00
comment_code.go [BUG] split code conversations in diff tab (#2306) 2024-02-16 12:16:11 +00:00
comment_list.go Use ghost user if user was not found (#29161) 2024-02-16 15:20:52 +01:00
comment_test.go [BUG] split code conversations in diff tab (#2306) 2024-02-16 12:16:11 +00:00
content_history.go [BUG] Ensure HasIssueContentHistory takes into account comment_id 2024-02-29 18:23:06 +01:00
content_history_test.go [BUG] Ensure HasIssueContentHistory takes into account comment_id 2024-02-29 18:23:06 +01:00
dependency.go
dependency_test.go
issue.go [FEAT] allow setting the update date on issues and comments 2024-02-05 14:44:33 +01:00
issue_index.go [GITEA] avoid superfluous synchronized pull_request run when opening a PR (#2236) 2024-02-05 16:57:58 +01:00
issue_index_test.go [GITEA] avoid superfluous synchronized pull_request run when opening a PR (#2236) 2024-02-05 16:57:58 +01:00
issue_label.go
issue_label_test.go
issue_list.go
issue_list_test.go
issue_lock.go
issue_project.go
issue_search.go Remove deadcode under models/issues (#28536) 2023-12-19 20:12:02 +01:00
issue_stats.go
issue_test.go Allow non-admin users to delete review requests (#29057) 2024-02-26 22:30:27 +01:00
issue_update.go [MODERATION] User blocking 2024-02-05 15:56:45 +01:00
issue_user.go
issue_user_test.go
issue_watch.go
issue_watch_test.go
issue_xref.go [CLEANUP] make golangci-lint@v1.56.1 happy 2024-02-15 16:19:36 +01:00
issue_xref_test.go
label.go Refactor deletion (#28610) 2023-12-25 21:25:29 +01:00
label_test.go Remove deadcode under models/issues (#28536) 2023-12-19 20:12:02 +01:00
main_test.go
milestone.go [FEAT] allow setting the update date on issues and comments 2024-02-05 14:44:33 +01:00
milestone_list.go Remove deadcode under models/issues (#28536) 2023-12-19 20:12:02 +01:00
milestone_test.go Remove deadcode under models/issues (#28536) 2023-12-19 20:12:02 +01:00
pull.go [BUG] Correct changed files for codeowners 2024-02-27 23:16:00 +01:00
pull_list.go [GITEA] avoid superfluous synchronized pull_request run when opening a PR (#2236) 2024-02-05 16:57:58 +01:00
pull_test.go Add API to get merged PR of a commit (#29243) 2024-02-26 22:30:26 +01:00
reaction.go [MODERATION] User blocking 2024-02-05 15:56:45 +01:00
reaction_test.go [MODERATION] User blocking 2024-02-05 15:56:45 +01:00
review.go Workaround to clean up old reviews on creating a new one (#28554) 2024-02-26 21:42:14 +01:00
review_list.go [CLEANUP] make golangci-lint@v1.56.1 happy 2024-02-15 16:19:36 +01:00
review_test.go
stopwatch.go Remove deadcode under models/issues (#28536) 2023-12-19 20:12:02 +01:00
stopwatch_test.go
tracked_time.go Add ability to see open and closed issues at the same time (#28757) 2024-01-15 15:07:22 +00:00
tracked_time_test.go Add ability to see open and closed issues at the same time (#28757) 2024-01-15 15:07:22 +00:00