|
|
@ -336,14 +336,13 @@ func EditIssue(ctx *context.APIContext, form api.EditIssueOption) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Update the deadline
|
|
|
|
// Update the deadline
|
|
|
|
var deadlineUnix timeutil.TimeStamp |
|
|
|
if form.Deadline != nil && ctx.Repo.CanWrite(models.UnitTypeIssues) { |
|
|
|
if form.Deadline != nil && !form.Deadline.IsZero() && ctx.Repo.CanWrite(models.UnitTypeIssues) { |
|
|
|
deadlineUnix := timeutil.TimeStamp(form.Deadline.Unix()) |
|
|
|
deadlineUnix = timeutil.TimeStamp(form.Deadline.Unix()) |
|
|
|
if err := models.UpdateIssueDeadline(issue, deadlineUnix, ctx.User); err != nil { |
|
|
|
} |
|
|
|
ctx.Error(500, "UpdateIssueDeadline", err) |
|
|
|
|
|
|
|
return |
|
|
|
if err := models.UpdateIssueDeadline(issue, deadlineUnix, ctx.User); err != nil { |
|
|
|
} |
|
|
|
ctx.Error(500, "UpdateIssueDeadline", err) |
|
|
|
issue.DeadlineUnix = deadlineUnix |
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Add/delete assignees
|
|
|
|
// Add/delete assignees
|
|
|
|