public ActionResult AlertRemove(Guid id)
        {
            var context = PortalCrmConfigurationManager.CreateServiceContext();

            var issue = context.CreateQuery("adx_issue").FirstOrDefault(adxIssue => adxIssue.GetAttributeValue <Guid>("adx_issueid") == id);

            if (issue == null || !Authorized(context, issue))
            {
                return(new EmptyResult());
            }

            var issueDataAdapter = new IssueDataAdapter(issue);
            var user             = PortalCrmConfigurationManager.CreatePortalContext().User;

            if (user == null)
            {
                return(new EmptyResult());
            }

            issueDataAdapter.DeleteAlert(user.ToEntityReference());

            var issueViewModel = new IssueViewModel
            {
                Issue = issueDataAdapter.Select(),
                CurrentUserHasAlert = issueDataAdapter.HasAlert()
            };

            return(PartialView("Tracking", issueViewModel));
        }
        private ActionResult GetIssueView(Entity adxIssueForum, Entity adxIssue, int?page)
        {
            var issueDataAdapter = new IssueDataAdapter(adxIssue)
            {
                ChronologicalComments = true
            };

            var issue = issueDataAdapter.Select();

            var comments = FeatureCheckHelper.IsFeatureEnabled(FeatureNames.Feedback)
                                ? new PaginatedList <IComment>(page, issueDataAdapter.SelectCommentCount(), issueDataAdapter.SelectComments)
                                : null;

            var issueViewModel = new IssueViewModel
            {
                IssueForum = new IssueForumDataAdapter(adxIssueForum).Select(),
                Issue      = issue,
                Comments   = new IssueCommentsViewModel {
                    Comments = comments, Issue = issue
                },
                CurrentUserHasAlert = issueDataAdapter.HasAlert()
            };

            return(View("Issue", issueViewModel));
        }