mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 00:20:25 +08:00 
			
		
		
		
	Fix redirect bug when creating issue from a project (#23971)
Fix #23966
This commit is contained in:
		@@ -1154,8 +1154,8 @@ func NewIssuePost(ctx *context.Context) {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	log.Trace("Issue created: %d/%d", repo.ID, issue.ID)
 | 
			
		||||
	if ctx.FormString("redirect_after_creation") == "project" {
 | 
			
		||||
		ctx.Redirect(ctx.Repo.RepoLink + "/projects/" + strconv.FormatInt(form.ProjectID, 10))
 | 
			
		||||
	if ctx.FormString("redirect_after_creation") == "project" && projectID > 0 {
 | 
			
		||||
		ctx.Redirect(ctx.Repo.RepoLink + "/projects/" + strconv.FormatInt(projectID, 10))
 | 
			
		||||
	} else {
 | 
			
		||||
		ctx.Redirect(issue.Link())
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user