MoveIssuesOnProjectColumn updated `project_issue` with a WHERE clause on
issue_id only. An issue assigned to several projects has one project_issue
row per project, so moving it within one project rewrote project_board_id
for every project the issue belonged to, detaching it from all the others.
Scope the UPDATE to (issue_id, project_id) so only the target project's
row changes. Mirrors the fix already present in upstream/main.
Adds an integration regression test asserting an issue in two user
projects keeps its column in the other project after a move. Fixes#17.
Cherry-pick of upstream PR go-gitea/gitea#37518 onto feat/projects-api.
The PR is itself a rebase of #36831 onto main, adapted for the
multi-projects-per-issue model added in #36784.
Endpoints (all under /repos/{owner}/{repo}/projects...):
GET . list projects
POST . create project
GET /{id} get project
PATCH /{id} update project
DELETE /{id} delete project
GET /{id}/columns list columns
POST /{id}/columns create column
PATCH /columns/{id} update column
DELETE /columns/{id} delete column
GET /columns/{id}/issues list issues in column
POST /columns/{id}/issues/{issue_id} add/move issue to column
DELETE /columns/{id}/issues/{issue_id} remove issue from column
POST /columns/{id}/issues/{issue_id}/move move between columns
Source: https://github.com/go-gitea/gitea/pull/37518
Fix team members missing from assignee list when `team_unit.access_mode`
is 0 but the doer is owner.
Fix #34871
1. Use `GetTeamUserIDsWithAccessToAnyRepoUnit` for repo assignee list
2. Load assignee list for project issues directly
3. Use `GetTeamUserIDsWithAccessToAnyRepoUnit` for repo reviewer list
Signed-off-by: Jakub Pisarczyk <pisarz77@gmail.com>
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
Co-authored-by: Giteabot <teabot@gitea.io>
Fix various legacy problems, including:
* Don't create default column when viewing an empty project
* Fix layouts for Windows
* Fix (partially) #15509
* Fix (partially) #17705
The sidebar refactoring: it is a clear partial-reloading approach,
brings better user experiences, and it makes "Multiple projects" /
"Project column on issue sidebar" feature easy to be added.
---------
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>