public async Task <IActionResult> UpdateIssue(int id, IssueViewModel issueVM) { if (id != issueVM.Id) { return(NotFound()); } if (ModelState.IsValid) { Status status = await _plansService.GetStatus(new ServiceContext() { ContextId = "TEST" }, issueVM.StatusId); Story story = await _plansService.GetStory(new ServiceContext() { ContextId = "TEST" }, issueVM.StoryId); Issue issue = issueVM.ViewModelToEntity(status, story); await _plansService.UpdateIssue(new ServiceContext() { ContextId = "TEST" }, issue); return(RedirectToAction(nameof(Index), new { id = issueVM.SprintId })); } return(View(issueVM)); }