mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-11-04 00:11:04 +00:00 
			
		
		
		
	(cherry picked from commit a9d1e4311e56855a6efc8defd3686f7f985617d0)
This commit is contained in:
		
					parent
					
						
							
								cc425ad87b
							
						
					
				
			
			
				commit
				
					
						0a90bf51af
					
				
			
		
					 1 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -38,6 +38,12 @@ func ToSearchOptions(keyword string, opts *issues_model.IssuesOptions) *SearchOp
 | 
			
		|||
		searchOpt.MilestoneIDs = opts.MilestoneIDs
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if opts.ProjectID > 0 {
 | 
			
		||||
		searchOpt.ProjectID = optional.Some(opts.ProjectID)
 | 
			
		||||
	} else if opts.ProjectID == -1 { // FIXME: this is inconsistent from other places
 | 
			
		||||
		searchOpt.ProjectID = optional.Some[int64](0) // Those issues with no project(projectid==0)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// See the comment of issues_model.SearchOptions for the reason why we need to convert
 | 
			
		||||
	convertID := func(id int64) optional.Option[int64] {
 | 
			
		||||
		if id > 0 {
 | 
			
		||||
| 
						 | 
				
			
			@ -49,7 +55,6 @@ func ToSearchOptions(keyword string, opts *issues_model.IssuesOptions) *SearchOp
 | 
			
		|||
		return nil
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	searchOpt.ProjectID = convertID(opts.ProjectID)
 | 
			
		||||
	searchOpt.ProjectBoardID = convertID(opts.ProjectBoardID)
 | 
			
		||||
	searchOpt.PosterID = convertID(opts.PosterID)
 | 
			
		||||
	searchOpt.AssigneeID = convertID(opts.AssigneeID)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue