@ -799,7 +799,7 @@ func NewIssue(ctx *context.Context) {
milestoneID := ctx . FormInt64 ( "milestone" )
milestoneID := ctx . FormInt64 ( "milestone" )
if milestoneID > 0 {
if milestoneID > 0 {
milestone , err := models . GetMilestoneByID ( milestoneID )
milestone , err := models . GetMilestoneByRepo ID ( ctx . Repo . Repository . ID , milestoneID )
if err != nil {
if err != nil {
log . Error ( "GetMilestoneByID: %d: %v" , milestoneID , err )
log . Error ( "GetMilestoneByID: %d: %v" , milestoneID , err )
} else {
} else {
@ -886,7 +886,7 @@ func ValidateRepoMetas(ctx *context.Context, form forms.CreateIssueForm, isPull
// Check milestone.
// Check milestone.
milestoneID := form . MilestoneID
milestoneID := form . MilestoneID
if milestoneID > 0 {
if milestoneID > 0 {
milestone , err := models . GetMilestoneByID ( milestoneID )
milestone , err := models . GetMilestoneByRepo ID ( ctx . Repo . Repository . ID , milestoneID )
if err != nil {
if err != nil {
ctx . ServerError ( "GetMilestoneByID" , err )
ctx . ServerError ( "GetMilestoneByID" , err )
return nil , nil , 0 , 0
return nil , nil , 0 , 0