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.
gitea/templates/repo/issue/view_content
sillyguodong bfecf3bd89
Fix internal sever error when visiting a PR that bound to the deleted team (#24127)
Close: #23738

The actual cause of `500 Internal Server Error` in the issue is not what
is descirbed in the issue.

The actual cause is that after deleting team, if there is a PR which has
requested reivew from the deleted team, the comment could not match with
the deleted team by `assgin_team_id`. So the value of `.AssigneeTeam`
(see below code block) is `nil` which cause `500 error`.


1c8bc4081a/templates/repo/issue/view_content/comments.tmpl (L691-L695)

To fix this bug, there are the following problems to be resolved:

- [x] 1. ~~Stroe the name of the team in `content` column when inserting
`comment` into DB in case that we cannot get the name of team after it
is deleted. But for comments that already exist, just display "Unknown
Team"~~ Just display "Ghost Team" in the comment if the assgined team is
deleted.
- [x] 2. Delete the PR&team binding (the row of which `review_team_id =
${team_id} ` in table `review`) when deleting team.
- [x] 3.For already exist and undeleted binding rows in in table
`review`, ~~we can delete these rows when executing migrations.~~ they
do not affect the function, so won't delete them.
2 years ago
..
add_reaction.tmpl Use data-tooltip-content for tippy tooltip (#23649) 2 years ago
attachments.tmpl Refactor `ctx` in templates (#23105) 2 years ago
comments.tmpl Fix internal sever error when visiting a PR that bound to the deleted team (#24127) 2 years ago
comments_delete_time.tmpl Use data-tooltip-content for tippy tooltip (#23649) 2 years ago
context_menu.tmpl Group template helper functions, remove `Printf`, improve template error messages (#23982) 2 years ago
pull.tmpl Fix "Updating branch by merge" bug in "update_branch_by_merge.tmpl" (#23790) 2 years ago
pull_merge_instruction.tmpl Refactor hiding-methods, remove jQuery show/hide, remove `.hide` class, remove inline style=display:none (#22950) 2 years ago
reactions.tmpl Merge template functions "dict/Dict/mergeinto" (#23932) 2 years ago
reference_issue_dialog.tmpl Group template helper functions, remove `Printf`, improve template error messages (#23982) 2 years ago
sidebar.tmpl Fix template error in pull request with deleted head repo (#24192) 2 years ago
update_branch_by_merge.tmpl Fix "Updating branch by merge" bug in "update_branch_by_merge.tmpl" (#23790) 2 years ago