Ejemplo n.º 1
0
        public ActionResult MyUnassigned_Data()
        {
            var ChartVM = new ChartVM();

            var myProjTickets = ticketsHelper.GetProjectTickets(User.Identity.GetUserId());
            //var myProjects = projHelper.ListUserProjects(User.Identity.GetUserId());
            var projects = new List <string>
            {
                "Baratheon",
                "Tyrell",
                "Stark",
                "Lannister",
                "Targaryen",
                "Dorne"
            };

            foreach (var entry in projects)
            {
                ChartVM.Data.Add(new ChartData
                {
                    Label = entry,
                    Value = myProjTickets.Where(t => t.Project.Name == entry && t.AssignedToUserId == null).Count().ToString()
                });
            }
            return(Content(JsonConvert.SerializeObject(ChartVM), "application/json"));
        }
Ejemplo n.º 2
0
        public ActionResult ProjectTickets(int projectId)
        {
            var tickets = ticketsHelper.GetProjectTickets(projectId);

            ViewBag.UserIndexFlag = true;
            return(View("Index", tickets));
        }