@@ -208,10 +208,10 @@ func SearchIssues(ctx *context.Context) {
208
208
if ctx .IsSigned {
209
209
ctxUserID := ctx .Doer .ID
210
210
if ctx .FormBool ("created" ) {
211
- searchOpt .PosterID = optional . Some (ctxUserID )
211
+ searchOpt .PosterID = strconv . FormatInt (ctxUserID , 10 )
212
212
}
213
213
if ctx .FormBool ("assigned" ) {
214
- searchOpt .AssigneeID = optional . Some (ctxUserID )
214
+ searchOpt .AssigneeID = strconv . FormatInt (ctxUserID , 10 )
215
215
}
216
216
if ctx .FormBool ("mentioned" ) {
217
217
searchOpt .MentionID = optional .Some (ctxUserID )
@@ -373,10 +373,10 @@ func SearchRepoIssuesJSON(ctx *context.Context) {
373
373
}
374
374
375
375
if createdByID > 0 {
376
- searchOpt .PosterID = optional . Some (createdByID )
376
+ searchOpt .PosterID = strconv . FormatInt (createdByID , 10 )
377
377
}
378
378
if assignedByID > 0 {
379
- searchOpt .AssigneeID = optional . Some (assignedByID )
379
+ searchOpt .AssigneeID = strconv . FormatInt (assignedByID , 10 )
380
380
}
381
381
if mentionedByID > 0 {
382
382
searchOpt .MentionID = optional .Some (mentionedByID )
@@ -490,19 +490,19 @@ func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption opt
490
490
viewType = "all"
491
491
}
492
492
493
- assigneeID := ctx .FormInt64 ("assignee" ) // TODO: use "optional" but not 0 in the future
493
+ assigneeID := ctx .FormString ("assignee" )
494
494
posterUsername := ctx .FormString ("poster" )
495
495
posterUserID := shared_user .GetFilterUserIDByName (ctx , posterUsername )
496
496
var mentionedID , reviewRequestedID , reviewedID int64
497
497
498
498
if ctx .IsSigned {
499
499
switch viewType {
500
500
case "created_by" :
501
- posterUserID = optional . Some (ctx .Doer .ID )
501
+ posterUserID = strconv . FormatInt (ctx .Doer .ID , 10 )
502
502
case "mentioned" :
503
503
mentionedID = ctx .Doer .ID
504
504
case "assigned" :
505
- assigneeID = ctx .Doer .ID
505
+ assigneeID = fmt . Sprint ( ctx .Doer .ID )
506
506
case "review_requested" :
507
507
reviewRequestedID = ctx .Doer .ID
508
508
case "reviewed_by" :
@@ -532,7 +532,7 @@ func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption opt
532
532
LabelIDs : labelIDs ,
533
533
MilestoneIDs : mileIDs ,
534
534
ProjectID : projectID ,
535
- AssigneeID : optional . Some ( assigneeID ) ,
535
+ AssigneeID : assigneeID ,
536
536
MentionedID : mentionedID ,
537
537
PosterID : posterUserID ,
538
538
ReviewRequestedID : reviewRequestedID ,
@@ -613,7 +613,7 @@ func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption opt
613
613
PageSize : setting .UI .IssuePagingNum ,
614
614
},
615
615
RepoIDs : []int64 {repo .ID },
616
- AssigneeID : optional . Some ( assigneeID ) ,
616
+ AssigneeID : assigneeID ,
617
617
PosterID : posterUserID ,
618
618
MentionedID : mentionedID ,
619
619
ReviewRequestedID : reviewRequestedID ,
0 commit comments