Exemplo n.º 1
0
 void doNewSprintWindow(int windowID)
 {
     idSprint = GUIComponents.labelTextField(new Rect(20,30,maxWidth-40,20),idSprint,"Titulo",220);
     descripcion = GUIComponents.labelTextArea(new Rect(20,60,maxWidth-40,80),descripcion,"Descripcion");
     fec_inicio = GUIComponents.labelTextField(new Rect(20,150,maxWidth-40,20),fec_inicio,"Fecha de inicio",180);
     fec_fin = GUIComponents.labelTextField(new Rect(20,180,maxWidth-40,20),fec_fin,"Fecha de finalizacion",180);
     scrollPosition = GUIComponents.itemList(new Rect(20,215,maxWidth-40,120),scrollPosition,"User Stories Asociadas",stories,selected);
     if (GUI.Button(new Rect(maxWidth/3-50,maxHeight-30,100,20),"Crear Sprint")){
         Sprint s = new Sprint();
         s.setTitulo(idSprint);
         s.setDescripcion(descripcion);
         char[] delimiterChars = { '/' };
         String[] fecha1 = fec_inicio.Split(delimiterChars);
         if(fecha1 != null)
             s.setFechaInicio(new DateTime(Convert.ToInt32(fecha1[2]),Convert.ToInt32(fecha1[1]),Convert.ToInt32(fecha1[0])));
         String[] fecha2 = fec_fin.Split(delimiterChars);
         if(fecha2 != null)
             s.setFechaFin(new DateTime(Convert.ToInt32(fecha2[2]),Convert.ToInt32(fecha2[1]),Convert.ToInt32(fecha2[0])));
         s.setEstado("Planned");
         ArrayList storiesSeleccionadas=getStoriesSelected(selected,stories);
         UserVS user = MultiPlayer.Instance.getUser();
         s.setId_Proyecto(user.getProyecto());
         s.setListaStories(storiesSeleccionadas);
         SFSObject obj = s.toSFSObject();
         long max = MultiPlayer.Instance.getListaSprints().Count;
         obj.PutLong("Id_Sprint",max);
         MultiPlayer.Instance.getSmartFox().Send(new ExtensionRequest("crearSprint",obj));
         sprintWindow = false;
     }
         //MultiPlayer.Instance
     if (GUI.Button(new Rect(2*maxWidth/3-50,maxHeight-30,100,20),"Cancelar"))
         sprintWindow = false;
 }
        public override void SetUp()
        {
            sprint = new Sprint();
            story = new Story(new Project(), new Gebruiker(), null, StoryType.UserStory);

            base.SetUp();
        }
Exemplo n.º 3
0
        public IEnumerable<ISprint> Make(string text)
        {
            var query =
                from line in text.Split(new[] { Environment.NewLine, "\n" }, StringSplitOptions.RemoveEmptyEntries)
                let item =
                    from f in new Func<string,object>[] { ToSprint, ToTask }
                    let v = f(line)
                    where v != null
                    select v
                let rslt = item.FirstOrDefault()
                where rslt != null
                select rslt;

            var items = query.ToArray();
            // まとめる
            var result = ToSprintList(items).ToArray();

            // 取りこぼしタスクがあったら無所属としてスプリント作っていれる
            var leaveTasks =
                from i in items.OfType<ITaskItem>()
                where result.SelectMany(x => x.Tasks).ToArray().Contains(i) == false
                select i;
            var leaveTasksArray = leaveTasks.ToArray();
            if (leaveTasksArray.Any())
            {
                var leaveSprint = new Sprint
                {
                    Name = "Pending(Auto)",
                    Tasks = leaveTasksArray,
                };
                result = result.Concat(leaveSprint).ToArray();
            }

            return result;
        }
 public ICollection<BacklogItem> AddSprint(string projectUId, Sprint sprint, bool addDefaultItems = false, string planItemName = null, string planGroupName = null, string deliveryItemName = null, string deliveryGroupName = null)
 {
     var client = ClientHelper.GetClient(authorizator);
     string param = String.Format("?addDefaultItems={0}&planItemName={1}&planGroupName={2}&deliveryItemName={3}&deliveryGroupName={4}", addDefaultItems, planItemName, planGroupName, deliveryItemName, deliveryGroupName);
     HttpResponseMessage response = client.Post(Url("Projects/" + projectUId.Trim() + "/Sprints" + param), new ObjectContent<Sprint>(sprint, JsonMediaTypeFormatter.DefaultMediaType));
     ClientHelper.HandleHTTPErrorCode(response);
     return response.Content.ReadAs<ICollection<BacklogItem>>();
 }
Exemplo n.º 5
0
        public static Story StoryMetSprintStoryEnSprintBacklogPrioriteit(Gebruiker gebruiker, Prioriteit prioriteit, Sprint sprint)
        {
            Story story = Story(gebruiker);

            sprint.MaakSprintStoryVoor(story);
            story.SprintStories[0].SprintBacklogPrioriteit = prioriteit;

            return story;
        }
Exemplo n.º 6
0
        public void TestSluitSprintAf()
        {
            Task task = Creation.TaskMetCompleteHierarchie();
            sprint = task.AssignedUser.Sprint;
            sprint.Close();

            Assert.AreEqual(State.Open, task.State);
            Assert.IsTrue(sprint.IsClosed);
        }
Exemplo n.º 7
0
        public static Story StoryMetSprintStoryEnSprintBacklogPrioriteit(User gebruiker, Priority prioriteit, Sprint sprint)
        {
            Story story = Story(gebruiker);

            sprint.CreateSprintStoryFor(story);
            story.SprintStories[0].SprintBacklogPriority = prioriteit;

            return story;
        }
Exemplo n.º 8
0
        public void TestSluitSprintAf()
        {
            Task task = Creation.TaskMetCompleteHierarchie();
            sprint = task.Behandelaar.Sprint;
            sprint.SluitSprintAf();

            Assert.AreEqual(Status.NietOpgepakt, task.Status);
            Assert.IsTrue(sprint.IsAfgesloten);
        }
        public override void SetUp()
        {
            project = new Project();
            sprint = new Sprint();
            gebruiker = new Gebruiker();
            project.VoegSprintToe(sprint);

            base.SetUp();
        }
Exemplo n.º 10
0
        internal static Sprint FetchSprint(SprintData data)
        {
            var result = new Sprint();

            result.Fetch(data);
            result.MarkOld();

            return result;
        }
        public override void SetUp()
        {
            project = new Project();
            sprint = new Sprint();
            gebruiker = new User();
            project.AddSprint(sprint);

            base.SetUp();
        }
Exemplo n.º 12
0
        public static Sprint SprintInsert(Sprint sprint)
        {
            sprint = sprint.Save();

            SourceRepository.SourceAdd(sprint.SprintId, SourceType.Sprint, sprint.Name);

            FeedRepository.FeedAdd(FeedAction.Created, sprint);

            return sprint;
        }
Exemplo n.º 13
0
        public async Task <IHttpActionResult> CreateSprintAsync(Sprint sprint)
        {
            var response = await _agileProject.CreateSprintAsync(sprint);

            if (response.IsSuccess)
            {
                return(Ok(response));
            }

            return(BadRequest(response.Message));
        }
Exemplo n.º 14
0
        public void GetSetter_returns_a_viable_object_for_Sprint_Tickets(Sprint sprint,
                                                                         Ticket ticket,
                                                                         SourceCollectionAccessor sut)
        {
            sprint.Tickets.Clear();
            var setter = sut.GetSetter(typeof(Sprint), nameof(Sprint.Tickets));

            setter.Set(sprint, new HashSet <Ticket>(new[] { ticket }));

            Assert.That(sprint.Tickets, Is.EquivalentTo(new[] { ticket }));
        }
Exemplo n.º 15
0
 public void StartSprint(Sprint sprint)
 {
     try
     {
         _projectBUS.StartSprint(sprint);
     }
     catch (CheckedException e)
     {
         throw e;
     }
 }
Exemplo n.º 16
0
 public Sprint EndSprint(int projectId, Sprint sprint)
 {
     try
     {
         return(_projectBUS.EndSprint(projectId, sprint));
     }
     catch (CheckedException e)
     {
         throw e;
     }
 }
 public SprintCreatedEvent(Sprint sprint)
 {
     Id     = sprint.Id;
     Name   = sprint.Name;
     Period = sprint.Period;
     TeamId = sprint.TeamId;
     CompletedPercentage        = sprint.WorkLoad.CompletedPercentage;
     RemainingWorkHours         = sprint.WorkLoad.RemainingWorkHours;
     TotalItemsOriginalEstimate = sprint.WorkLoad.TotalItemsOriginalEstimate;
     CompletedWorkHours         = sprint.WorkLoad.CompletedWorkHours;
 }
        public ActionResult Create([Bind(Include = "SprintID,SprintName,Date_debut,Date_fin,ProjetID")] Sprint sprint)
        {
            if (ModelState.IsValid)
            {
                db.Sprints.Add(sprint);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(sprint));
        }
Exemplo n.º 19
0
        public int calculaTotalPontos(Sprint sprint)
        {
            int totalPontosSprint = 0;

            foreach (Estoria est in sprint.getEstorias())
            {
                totalPontosSprint += est.getQtdePontos();
            }

            return(totalPontosSprint);
        }
Exemplo n.º 20
0
        public Double calculaTotalHoras(Sprint sprint)
        {
            Double totalHorasSprint = 0.0;

            foreach (Estoria est in sprint.getEstorias())
            {
                totalHorasSprint += est.getTempoRestante();
            }

            return(totalHorasSprint);
        }
Exemplo n.º 21
0
        public static Sprint CreateSprint(int ID, byte[] rowVersion, string name, global::System.DateTime startDate, global::System.DateTime finishDate)
        {
            Sprint sprint = new Sprint();

            sprint.Id         = ID;
            sprint.RowVersion = rowVersion;
            sprint.Name       = name;
            sprint.StartDate  = startDate;
            sprint.FinishDate = finishDate;
            return(sprint);
        }
Exemplo n.º 22
0
        private void PopulateTable(Table table, Sprint sprint)
        {
            GenerateTableHeaderRow(table.Rows[0]);
            var rowNumber = 1;

            foreach (var week in sprint.SprintDataPlan)
            {
                GenerateTableRow(table.Rows[rowNumber], week);
                rowNumber++;
            }
        }
Exemplo n.º 23
0
        public static void SyncSprintsToOutlook(String calendarName, Release release, EntityListResult <Sprint> sprints)
        {
            //set sprint map
            Dictionary <long, Sprint> sprintMap = new Dictionary <long, Sprint>();

            foreach (Sprint sprint in sprints.data)
            {
                sprintMap[sprint.Id] = sprint;
            }

            //iterate outlook appointments
            Items resultItems = OutlookUtils.GetAppointmentsInRange(calendarName, new DateTime(2015, 1, 1), new DateTime(2030, 1, 1));

            foreach (AppointmentItem appointment in resultItems)
            {
                UserProperty releaseUP            = appointment.UserProperties[OutlookUtils.APPOINTMENT_RELEASE_ID_FIELD];
                int          appointmentReleaseId = (releaseUP == null ? NO_ID_VALUE : int.Parse(releaseUP.Value));

                UserProperty sprintUP            = appointment.UserProperties[OutlookUtils.APPOINTMENT_SPRINT_ID_FIELD];
                int          appointmentSprintId = (sprintUP == null ? NO_ID_VALUE : int.Parse(sprintUP.Value));

                if (appointmentReleaseId != NO_ID_VALUE && appointmentSprintId != NO_ID_VALUE) //sprint
                {
                    if (sprintMap.ContainsKey(appointmentSprintId))
                    {
                        Sprint tempSprint = sprintMap[appointmentSprintId];
                        sprintMap.Remove(appointmentSprintId);


                        if (tempSprint != null)
                        {
                            SyncSprintToOutlook(tempSprint, appointment);
                        }
                    }
                    else
                    {
                        //Delete a Sprint that no longer exist
                        appointment.Delete();
                    }
                }

                Marshal.ReleaseComObject(appointment);
            }

            //create sprints that were not deleted from map
            foreach (Sprint sprint in sprintMap.Values)
            {
                Dictionary <String, Object> customFields = new Dictionary <String, Object>();
                customFields.Add(OutlookUtils.APPOINTMENT_RELEASE_ID_FIELD, sprint.Release.Id);
                customFields[OutlookUtils.APPOINTMENT_SPRINT_ID_FIELD] = sprint.Id;
                String sprintName = getSprintAppointmentName(sprint);
                OutlookUtils.AddAppointment(sprintName, sprint.StartDate, sprint.EndDate, "", 0, false, customFields, true);
            }
        }
Exemplo n.º 24
0
        // GET: /Sprint/Create
        public ActionResult Create()
        {
            var sprint = new Sprint
            {
                ProjectId = SelectedProjectId.Value,
                StartDate = DateTime.Today,
                EndDate   = DateTime.Today
            };

            return(View(sprint));
        }
Exemplo n.º 25
0
        //
        // GET: /Iteration/Details/5
        //public ActionResult Details(string name )
        //{
        //    Sprint sprint = db.Sprints.Where(sp => sp.Name == name).FirstOrDefault();
        //    if (sprint == null)
        //    {
        //        return HttpNotFound();
        //    }
        //    return View(sprint);
        //}

        ////
        //// GET: /Iteration/Create

        //public ActionResult Create()
        //{

        //    return View();
        //}

        ////
        //// POST: /Iteration/Create

        //[HttpPost]
        //public ActionResult Create(Sprint sprint)
        //{
        //    if (ModelState.IsValid)
        //    {
        //        db.Sprints.Add(sprint);
        //        db.SaveChanges();
        //        return RedirectToAction("Index");
        //    }

        //    return View(sprint);
        //}

        //
        // GET: /Iteration/Edit/5

        public ActionResult Edit(int id = 0)
        {
            Sprint sprint = db.Sprints.Find(id);

            if (sprint == null)
            {
                return(HttpNotFound());
            }

            return(View(sprint));
        }
        public void TestVindGeenSprintGebruikerVanAndereSprints()
        {
            Gebruiker gb = new Gebruiker();
            Sprint sprint2 = new Sprint();
            sprint2.VoegGebruikerToe(gb, SprintRol.Developer);
            sprint.VoegGebruikerToe(gb, SprintRol.Developer);

            SprintGebruiker sg = gb.GeefSprintGebruikerVoor(sprint);

            Assert.AreEqual(sprint, sg.Sprint);
        }
Exemplo n.º 27
0
        public ActionResult CreateSprintFromKanban(long id)
        {
            Sprint sprint = new Sprint();

            sprint.StartDate = DateTime.Now;
            sprint.EndDate   = DateTime.Now;
            sprint.ProjectID = id;
            sprint.Project   = unitOfWork.ProjectRepository.Find(sprint.ProjectID);

            return(PartialView(sprint));
        }
Exemplo n.º 28
0
        private void LoadSprintInformation(Sprint sprint, HtmlAgilityPack.HtmlNode htmlNode)
        {
            var sectionList      = htmlNode.SelectSingleNode("//*[@id='infoPanel']").Descendants().Where(t => t.Name == "tr").ToList();
            var IterationSection = sectionList[3];
            var durationItem     = IterationSection.ChildNodes.Where(t => t.Name == "td").ToList()[1];

            var startAndEndTime = durationItem.InnerText.Split('-');

            sprint.StartTime = DateTime.Parse(startAndEndTime[0]);
            sprint.EndTime   = DateTime.Parse(startAndEndTime[1]);
        }
Exemplo n.º 29
0
 private async Task <bool> EditSprintAsync(Sprint sprint)
 {
     if (await _accessCheckService.IsOwnerAsync(sprint.TeamId))
     {
         return(await _manageSprintsService.EditSprintAsync(sprint));
     }
     else
     {
         return(false);
     }
 }
Exemplo n.º 30
0
        // GET: /Sprint/ChangeStatus/5?status=1
        public ActionResult ChangeStatus(int?id, Status?status)
        {
            if (id == null || status.HasValue == false || Request.UrlReferrer == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Sprint sprint = db.GetSprintById(User, id.Value);

            if (sprint == null)
            {
                return(HttpNotFound());
            }
            if (status.Value != Status.Active)
            {
                //check if contains the selected action
                if (sprint.ContainsSelectedAction)
                {
                    //not working nor pending confirmation
                    if (sprint.Owner.WorkingPanelAvailable)
                    {
                        //clear selected action
                        sprint.Owner.ActionID        = null;
                        db.Entry(sprint.Owner).State = EntityState.Modified;
                    }
                    else
                    {
                        //cannot perform change
                        TempData["UpdateError"] = Settings.MSG_UNSUCCESSFUL_BECAUSE_WORKING;
                        return(Redirect(Request.UrlReferrer.AbsoluteUri));
                    }
                }
            }
            //update end date
            if (Sprint.IsFinishedStatus(status.Value))
            {
                //if no end date
                if (sprint.EndDate.HasValue == false)
                {
                    sprint.EndDate = DateTime.UtcNow;
                }
            }
            else
            {
                //remove end date
                sprint.EndDate = null;
            }

            sprint.Status          = status.Value;
            db.Entry(sprint).State = EntityState.Modified;
            db.SaveChanges();

            TempData["UpdateInfo"] = Settings.MSG_SUCCESSFUL_UPDATE;
            return(Redirect(Request.UrlReferrer.AbsoluteUri));
        }
Exemplo n.º 31
0
 public ActionResult Edit([Bind(Include = "Id,Description,DateDebut,DateLimite,BacklogId")] Sprint sprint)
 {
     if (ModelState.IsValid)
     {
         db.Entry(sprint).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.BacklogId = new SelectList(db.Backlogs, "Id", "Description", sprint.BacklogId);
     return(View(sprint));
 }
Exemplo n.º 32
0
 public ActionResult Create([Bind(Include = "Id,SprintName,Description,SprintRunning,StartDate,EndDate,ReleaseBacklogId,")] Sprint sprint)
 {
     if (ModelState.IsValid)
     {
         service.CreateSprint(sprint);
         //db.Sprints.Add(sprint);
         //db.SaveChanges();
         return(RedirectToAction("Details", new { Id = sprint.Id }));
     }
     return(View("Details", "ReleaseBacklog", new { Id = sprint.ReleaseBacklogId }));
 }
Exemplo n.º 33
0
 public async Task <bool> AddSprintAsync(Sprint sprint)
 {
     if (_sprintRepository.GetAll()
         .Where(x => x.TeamId == sprint.TeamId)
         .Any(x => x.Name == sprint.Name) ||
         sprint.DaysInSprint <= 0 || sprint.StoryPointInHours <= 0 || !Regex.IsMatch(sprint.Name, ("^[a-zA-Z0-9-_.]+$")))
     {
         return(false);
     }
     return(await _sprintRepository.InsertAsync(sprint));
 }
Exemplo n.º 34
0
 public static void ShowFocus(Sprint sprint = null)
 {
     if (board)
     {
         board.Focus();
     }
     if (sprint != null)
     {
         ShowSprint(sprint);
     }
 }
Exemplo n.º 35
0
 private void Map(FormCollection source, Sprint destination)
 {
     destination.CompletedDate          = DateTime.Parse(source["CompletedDate"]);
     destination.Description            = source["Description"];
     destination.IsActive               = ModelHelper.ToBoolean(source["IsActive"]);
     destination.IsArchived             = ModelHelper.ToBoolean(source["IsArchived"]);
     destination.IsCompleted            = ModelHelper.ToBoolean(source["IsCompleted"]);
     destination.EstimatedCompletedDate = DateTime.Parse(source["EstimatedCompletedDate"]);
     destination.EstimatedDuration      = int.Parse(source["EstimatedDuration"]);
     destination.Name = source["Name"];
 }
Exemplo n.º 36
0
        private List <SqlParameter> criarListaParametros(Sprint p)
        {
            List <SqlParameter> parametros = new List <SqlParameter>();

            parametros.Add(new SqlParameter("codigo", p.Codigo));
            parametros.Add(new SqlParameter("nome", p.Nome));
            parametros.Add(new SqlParameter("dtInicio", p.DtInicio));
            parametros.Add(new SqlParameter("dtFinal", p.DtFinal));
            parametros.Add(new SqlParameter("projeto", p.Projeto));
            return(parametros);
        }
Exemplo n.º 37
0
        public ActionResult Edit(Sprint sprint)
        {
            if (ModelState.IsValid)
            {
                unitOfWork.SprintRepository.InsertOrUpdate(sprint);
                unitOfWork.Save();
                return(RedirectToAction("Index", new { @projectId = sprint.ProjectID }));
            }

            return(View(sprint));
        }
Exemplo n.º 38
0
        private void executarQuery(List <Sprint> lista, string query)
        {
            SqlConnection conn = null;

            for (int i = 0; i < lista.Count; i++)
            {
                Sprint f = lista[i];
                save(conn, query, criarListaParametros(f));
            }
            desconectar(conn);
        }
Exemplo n.º 39
0
        public async Task <IActionResult> Create([Bind("SprintId,NomeSprint")] Sprint sprint)
        {
            if (ModelState.IsValid)
            {
                _context.Add(sprint);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(sprint));
        }
Exemplo n.º 40
0
        public ActionResult Edit(Sprint sprint)
        {
            if (ModelState.IsValid)
            {
                db.Entry(sprint).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(sprint));
        }
        public void TestVindGeenSprintGebruikerVanAndereSprints()
        {
            User gb = new User();
            Sprint sprint2 = new Sprint();
            sprint2.AddUser(gb, SprintRole.Developer);
            sprint.AddUser(gb, SprintRole.Developer);

            SprintUser sg = gb.GetSprintUserFor(sprint);

            Assert.AreEqual(sprint, sg.Sprint);
        }
Exemplo n.º 42
0
        void kanbanItem_DeleteButtonClicked(object sender, DeleteButtonClickedEventArgs e)
        {
            DialogResult dialogResult = MessageBox.Show("Are you sure ?", "Remove task from kanban", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);

            if (dialogResult == DialogResult.Yes)
            {
                Sprint sprint = (Sprint)comboBoxCurrentSprint.SelectedItem;
                sprint.Kanban.Remove(e.KanbanPosition);
                e.TaskItem.Dispose();
            }
        }
Exemplo n.º 43
0
        public ActionResult Create([Bind(Include = "Id,DataInicio,DataFim")] Sprint sprint)
        {
            if (ModelState.IsValid)
            {
                db.Sprints.Add(sprint);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(sprint));
        }
Exemplo n.º 44
0
        public void TestAddReviewDocumentWhenSprintIsActive()
        {
            Sprint         sprint   = new Sprint(DateTime.Today, DateTime.Today.AddDays(10));
            ReviewDocument document = new ReviewDocument();

            sprint.Start();

            sprint.AddReviewDocument(document);

            Assert.IsTrue(sprint.GetDocument() == null);
        }
Exemplo n.º 45
0
        public static bool SprintDelete(Sprint sprint)
        {
            ProjectUserRepository.AuthorizeProjectUser(sprint.ProjectId);

            Sprint.DeleteSprint(
                new SprintDataCriteria
                {
                    SprintId = sprint.SprintId
                });

            FeedRepository.FeedAdd(FeedAction.Deleted, sprint);

            return true;
        }
Exemplo n.º 46
0
        public override void Initialize()
        {
            maandag = ((DateTime) ComponentParams["maandag"]);
            sprint = ((Sprint) ComponentParams["sprint"]);
            sprintGebruiker = ((SprintGebruiker) ComponentParams["sprintGebruiker"]);
            formaction = ((string)ComponentParams["formaction"]);

            dinsdag = maandag.AddDays(1);
            woensdag = maandag.AddDays(2);
            donderdag = maandag.AddDays(3);
            vrijdag = maandag.AddDays(4);

            base.Initialize();
        }
Exemplo n.º 47
0
        public ActionResult CreateNew(FormCollection formCollection)
        {
            var sprint = new Sprint
                             {
                                 Name = formCollection["name"],
                                 StartDate = DateTime.Parse(formCollection["startdate"]),
                                 EndDate = DateTime.Parse(formCollection["enddate"]),
                             };

            var project = _projectRepository.Get(int.Parse(formCollection["projectId"]));
            project.Sprints.Add(sprint);
            _projectRepository.Save(project);

            return RedirectToAction("Index");
        }
Exemplo n.º 48
0
        /// <summary>
        /// Query all stories not in the given sprint.
        /// </summary>
        /// <param name="session">The session.</param>
        /// <param name="sprint">The sprint.</param>
        /// <returns></returns>
        public ICriteria GetQuery(ISession session, Sprint sprint)
        {
            NotClosedStoriesQuery allStoriesInProject = new NotClosedStoriesQuery();

            if (sprint.Project != null)
                allStoriesInProject.Project = sprint.Project;

            ICriteria criteria = allStoriesInProject.GetQuery(session);

            DetachedCriteria allSprintStoriesBelongingToSprint = DetachedCriteria.For(typeof (SprintStory))
                .SetProjection(Projections.Property("Story.Id"))
                .Add(Restrictions.Eq("Sprint", sprint));

            criteria.Add(Subqueries.PropertyNotIn("Id", allSprintStoriesBelongingToSprint)).SetResultTransformer(
                CriteriaSpecification.DistinctRootEntity);

            return criteria;
        }
Exemplo n.º 49
0
        /// <summary>
        /// Process this object with the given sprint
        /// </summary>
        /// <param name="sprint"></param>
        public virtual void Process(Sprint sprint)
        {
            if (user == null || sprint == null)
                return;

            SprintUser sprintGebruiker = sprint.GetSprintUserFor(user);

            if (sprintRole == 0)
            {
                if (sprintGebruiker == null)
                    return;

                sprintGebruiker.DecoupleSprintUser();
            }
            else
            {
                if (sprintGebruiker == null)
                    sprint.AddUser(user, sprintRole);
                else
                    sprintGebruiker.SprintRole = sprintRole;
            }
        }
Exemplo n.º 50
0
        public override void SetUp()
        {
            Random random = new Random();

            base.SetUp();

            // 4 gebruikers
            for (int i = 0; i<testCaseDevelopers.Length; i++ )
            {
                testCaseDevelopers[i] = Creation.Gebruiker(SystemRole.User);
            }

            // 1 project
            testCaseProject = Creation.Project();

            // 1 sprint
            testCaseSprint = Creation.Sprint(testCaseProject);
            testCaseSprint.WorkDays = 40; // 4 devvers voor 2 weken = 4 * 2 * 5 dagen.

            foreach (User developer in testCaseDevelopers)
            {
                testCaseSprint.AddUser(developer, SprintRole.Developer);
            }
            testCaseSprint.SprintUsers[0].AddRole(SprintRole.ScrumMaster);

            // 1 story, 2 taken, beide afgesloten
            const int hoursPerStoryPoint = 2;
            Story testCaseStory1 = Creation.Story(testCaseProject, StoryPoint.Eight, hoursPerStoryPoint, Priority.Must, testCaseDevelopers[random.Next(0,3)]);
            testCaseSprint.CreateSprintStoryFor(testCaseStory1);

            Task task1_1 = Creation.Task();
            testCaseStory1.AddTask(task1_1);
            task1_1.RegisterTime(testCaseDevelopers[random.Next(0, 3)], DateTime.Now, testCaseSprint, new TimeSpan(8,0,0));
            task1_1.Close();
            Task task1_2 = Creation.Task();
            testCaseStory1.AddTask(task1_2);
            task1_2.RegisterTime(testCaseDevelopers[random.Next(0, 3)], DateTime.Now, testCaseSprint, new TimeSpan(12, 0, 0));
            task1_2.Close();
        }
Exemplo n.º 51
0
        public override void SetUp()
        {
            Random random = new Random();

            base.SetUp();

            // 4 gebruikers
            for (int i = 0; i<testCaseDevelopers.Length; i++ )
            {
                testCaseDevelopers[i] = Creation.Gebruiker(SysteemRol.Gebruiker);
            }

            // 1 project
            testCaseProject = Creation.Project();

            // 1 sprint
            testCaseSprint = Creation.Sprint(testCaseProject);
            testCaseSprint.WerkDagen = 40; // 4 devvers voor 2 weken = 4 * 2 * 5 dagen.

            foreach (Gebruiker developer in testCaseDevelopers)
            {
                testCaseSprint.VoegGebruikerToe(developer, SprintRol.Developer);
            }
            testCaseSprint.SprintGebruikers[0].VoegRolToe(SprintRol.ScrumMaster);

            // 1 story, 2 taken, beide afgesloten
            const int hoursPerStoryPoint = 2;
            Story testCaseStory1 = Creation.Story(testCaseProject, StoryPoint.Acht, hoursPerStoryPoint, Prioriteit.Must, testCaseDevelopers[random.Next(0,3)]);
            testCaseSprint.MaakSprintStoryVoor(testCaseStory1);

            Task task1_1 = Creation.Task();
            testCaseStory1.VoegTaskToe(task1_1);
            task1_1.MaakTijdRegistratie(testCaseDevelopers[random.Next(0, 3)], DateTime.Now, testCaseSprint, new TimeSpan(8,0,0));
            task1_1.SluitTaak();
            Task task1_2 = Creation.Task();
            testCaseStory1.VoegTaskToe(task1_2);
            task1_2.MaakTijdRegistratie(testCaseDevelopers[random.Next(0, 3)], DateTime.Now, testCaseSprint, new TimeSpan(12, 0, 0));
            task1_2.SluitTaak();
        }
Exemplo n.º 52
0
        /// <summary>
        /// Verwerk dit object met de gegeven sprint.
        /// </summary>
        /// <param name="sprint"></param>
        public virtual void Verwerk(Sprint sprint)
        {
            if (gebruiker == null || sprint == null)
                return;

            SprintGebruiker sprintGebruiker = sprint.GeefSprintGebruikerVoor(gebruiker);

            if (sprintRol == 0)
            {
                if (sprintGebruiker == null)
                    return;

                sprintGebruiker.KoppelSprintGebruikerLos();
            }
            else
            {
                if (sprintGebruiker == null)
                    sprint.VoegGebruikerToe(gebruiker, sprintRol);
                else
                    sprintGebruiker.SprintRol = sprintRol;
            }
        }
Exemplo n.º 53
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SprintViewModel"/> class.
        /// </summary>
        /// <param name="sprint">The sprint.</param>
        /// <param name="backlog">The backlog.</param>
        public SprintViewModel(
            IProjectsService projectsService,
            IBackgroundExecutor backgroundExecutor,
            IEventAggregator eventAggregator,
            Sprint sprint,
            ICollection<BacklogItemViewModel> backlog,
            ScrumFactory.Composition.Configuration sfConfig,
            ICalendarService calendar)
        {
            this.projectsService = projectsService;
            this.executor = backgroundExecutor;
            this.aggregator = eventAggregator;

            this.calendar = calendar;

            SFConfig = sfConfig;

            Sprint = sprint;
            backlogViewSource = new CollectionViewSource();
            backlogViewSource.Source = backlog;
            backlogViewSource.SortDescriptions.Add(new SortDescription("Item.OccurrenceConstraint", ListSortDirection.Ascending));
            backlogViewSource.SortDescriptions.Add(new SortDescription("Item.BusinessPriority", ListSortDirection.Ascending));
            backlogViewSource.Filter += new FilterEventHandler(backlogViewSource_Filter);
        }
Exemplo n.º 54
0
 public ICollection<Sprint> UpdateSprint(string projectUId, string sprintUId, Sprint sprint)
 {
     var client = ClientHelper.GetClient(authorizator);
     HttpResponseMessage response = client.Put(Url("Projects/" + projectUId.Trim() + "/Sprints/" + sprintUId.Trim()), new ObjectContent<Sprint>(sprint, JsonMediaTypeFormatter.DefaultMediaType));
     ClientHelper.HandleHTTPErrorCode(response);
     return response.Content.ReadAs<ICollection<Sprint>>();
 }
 private decimal GetHoursLeftForDay(int planningNumber, Sprint sprint, ICollection<BacklogItem> items, DateTime day)
 {
     if (day < sprint.StartDate || day > sprint.EndDate)
         return 0;
     decimal hours0 = GetTotalPlannedHoursForSprint(planningNumber, sprint.SprintNumber, items);
     decimal hours1 = GetTotalPlannedHoursForSprint(planningNumber, sprint.SprintNumber + 1, items);
     int days = sprint.EndDate.Subtract(sprint.StartDate).Days;
     if (days == 0)
         return 0;
     decimal ratio = (hours0 - hours1) / days;
     return hours0 - (ratio * day.Subtract(sprint.StartDate).Days);
 }
Exemplo n.º 56
0
        public void ShiftItemsAfter(string backlogitemUId, string planItemName, string deliveryItemName)
        {
            // find my item
            BacklogItem myItem = GetBacklogItem(backlogitemUId);
            if (myItem == null)
                return;

            // verify permission set
            authorizationService.VerifyPermissionAtProject(myItem.ProjectUId, PermissionSets.SCRUM_MASTER);

            // gets the project
            Project project = projectsService.GetProject(myItem.ProjectUId);
            Sprint lastSprint = project.LastSprint;
            if (lastSprint == null)
                return;

            // if there is no next sprint, creates a new one
            if (myItem.SprintNumber == lastSprint.SprintNumber) {
                Sprint newSprint = new Sprint() {
                    SprintUId = Guid.NewGuid().ToString(),
                    SprintNumber = project.NextSprintNumber,
                    StartDate = lastSprint.EndDate.AddDays(1),
                    EndDate = lastSprint.EndDate.AddDays(16),
                    ProjectUId = project.ProjectUId
                };
                projectsService.AddSprint(project.ProjectUId, newSprint, true, planItemName, null, deliveryItemName, null);
            }

            // get all backlogitems
            ICollection<BacklogItem> backlog = GetCurrentBacklog(myItem.ProjectUId, (short)BacklogFiltersMode.ALL);

            // select only the items of my sprint and after me
            backlog = backlog.Where(i =>
                i.SprintNumber==myItem.SprintNumber &&
                i.BusinessPriority > myItem.BusinessPriority &&
                i.OccurrenceConstraint == (short)ItemOccurrenceContraints.DEVELOPMENT_OCC)
                .OrderBy(i => i.BusinessPriority).ToList();

            using (TransactionScope scope = new TransactionScope()) {

                // lets move each item to next sprint
                foreach (BacklogItem item in backlog)
                    ChangeItemSprint(item, backlog, project, (int)item.SprintNumber + 1, true);

                scope.Complete();
            }
        }
Exemplo n.º 57
0
 public static Sprint CreateSprint(int ID, byte[] rowVersion, string name, global::System.DateTime startDate, global::System.DateTime finishDate)
 {
     Sprint sprint = new Sprint();
     sprint.Id = ID;
     sprint.RowVersion = rowVersion;
     sprint.Name = name;
     sprint.StartDate = startDate;
     sprint.FinishDate = finishDate;
     return sprint;
 }
Exemplo n.º 58
0
 public void AddToSprints(Sprint sprint)
 {
     base.AddObject("Sprints", sprint);
 }
Exemplo n.º 59
0
        /// <summary>
        /// Creates the data.
        /// </summary>
        public void CreateData()
        {
            #region Projecten
            Project project_JelloScrum = new Project();
            project_JelloScrum.Naam = "Jello Scrum";
            project_JelloScrum.Omschrijving = "Scrum project managment tool";

            ProjectRepository.Save(project_JelloScrum);

            Project project_James = new Project();
            project_James.Naam = "James";
            project_James.Omschrijving = "Inklok systeem voor Auxilium BV";
            ProjectRepository.Save(project_James);
            #endregion

            #region Gebruikers
            Gebruiker user1 = new Gebruiker();
            user1.Naam = "user1";
            user1.GebruikersNaam = "ProductOwner";
            user1.VolledigeNaam = "Gebruiker 1";
            GebruikerRepository.Save(user1);

            Gebruiker user2 = new Gebruiker();
            user2.Naam = "user2";
            user2.GebruikersNaam = "ScrumMaster";
            user2.SysteemRol = SysteemRol.Administrator;
            user2.VolledigeNaam = "Gebruiker 2";
            GebruikerRepository.Save(user2);

            Gebruiker user3 = new Gebruiker();
            user3.Naam = "user3";
            user3.GebruikersNaam = "Developer";
            user3.SysteemRol = SysteemRol.Gebruiker;
            user3.VolledigeNaam = "Gebruiker 3";
            GebruikerRepository.Save(user3);
            #endregion

            #region Stories
            #region JelloScrum stories
            for (int i = 0; i < 20; i++)
            {
                Story story = new Story(project_JelloScrum, user1, null, StoryType.UserStory);
                story.HowtoDemo = "uitleg voor de demo " + i.ToString();
                story.Notitie = "notitie " + i.ToString();
                story.Omschrijving = "omschrijving " + i.ToString();
                story.ProductBacklogPrioriteit = (Prioriteit)RandomNumber(0, 3);
                story.Schatting = new TimeSpan(4, 30, 0);
                story.Titel = "JelloScrum story number: " + i.ToString();

                ProjectRepository.Save(project_JelloScrum);
            }
            #endregion

            #region James stories
            for (int i = 0; i < 20; i++)
            {
                Story story = new Story(project_James, user1, null, StoryType.UserStory);
                story.HowtoDemo = "uitleg voor de demo " + i.ToString();
                story.Notitie = "notitie " + i.ToString();
                story.Omschrijving = "omschrijving " + i.ToString();
                story.ProductBacklogPrioriteit = (Prioriteit)RandomNumber(0, 3);
                story.Schatting = new TimeSpan(6, 0, 0);
                story.Titel = "James story number: " + i.ToString();

                ProjectRepository.Save(project_James);
            }
            #endregion
            #endregion

            #region Tasks
                #region JelloScrum
            foreach (Story story in project_JelloScrum.Stories)
            {
                for (int i = RandomNumber(0, 4); i < 6; i++)
                {
                    Task task = new Task();
                    task.Omschrijving = "Omschrijving voor JelloScrum story " + story.Titel + " taak nummer " + i.ToString();
                    task.Story = story;
                    story.VoegTaskToe(task);
                    TaskCommentaarBericht bericht = new TaskCommentaarBericht(task, "blabla comment teskt " + i.ToString());
                    task.VoegCommentaarBerichtToe(bericht);
                    StoryRepository.SaveOrUpdate(story);
                }
                story.VoegCommentaarBerichtToe("Storycomment James teskt");
                StoryRepository.Save(story);
            }
            #endregion

                #region James
            foreach (Story story in project_James.Stories)
            {
                for (int i = RandomNumber(0, 4); i < 5; i++)
                {
                    Task task = new Task();
                    task.Omschrijving = "Omschrijving voor James story " + story.Titel + " taak nummer " + i.ToString();
                    task.Story = story;
                    story.VoegTaskToe(task);
                    TaskCommentaarBericht bericht = new TaskCommentaarBericht(task,"blabla comment teskt " + i.ToString());
                    task.VoegCommentaarBerichtToe(bericht);
                    StoryRepository.Save(story);
                }
                story.VoegCommentaarBerichtToe("Storycomment James teskt");
                StoryRepository.Save(story);
            }
            #endregion
            #endregion

            #region Sprints
            #region JelloScrum Sprints
            int num = 0;
            for (int i = 0; i < 6; i++)
            {
                Sprint sprint = new Sprint();
                sprint.Doel = "JelloScrum SprintDoel #" + i.ToString();
                sprint.StartDatum = DateTime.Now.AddDays((5 * i));
                sprint.EindDatum = DateTime.Now.AddDays((5 * i) + 20);
                sprint.Project = project_JelloScrum;
                SprintRepository.Save(sprint);

                SprintGebruiker sprintGebruiker = new SprintGebruiker(user1, sprint, SprintRol.ProductOwner);
                SprintGebruiker sprintGebruiker2 = new SprintGebruiker(user3, sprint, SprintRol.Developer);
                SprintGebruiker sprintGebruiker3 = new SprintGebruiker(user2, sprint, SprintRol.ScrumMaster);
                SprintGebruikerRepository.Save(sprintGebruiker);
                SprintGebruikerRepository.Save(sprintGebruiker2);
                SprintGebruikerRepository.Save(sprintGebruiker3);

                SprintRepository.Save(sprint);
                GebruikerRepository.Save(user1);
                GebruikerRepository.Save(user3);
                /*for (int y = 0; y < 3; y++)
                {
                    SprintStory sprintStory = sprint.MaakSprintStoryVoor(project_JelloScrum.Stories[num]);

                    // retrieve a story

                    sprintStory.SprintBacklogPrioriteit = (Prioriteit)RandomNumber(0, 3);
                    SprintStoryRepository.Save(sprintStory);

                    if (sprintStory.Status != Status.NietOpgepakt)
                    {
                        // ook even wat werkuren toevoegen
                        sprintStory.Story.Tasks[RandomNumber(0, sprintStory.Story.Tasks.Count - 1)].MaakTijdRegistratie(user1, DateTime.Today, sprintStory.Sprint, new TimeSpan(0, 0, RandomNumber(1, 60)));
                        sprintStory.Story.Tasks[RandomNumber(0, sprintStory.Story.Tasks.Count - 1)].MaakTijdRegistratie(user2, DateTime.Today, sprintStory.Sprint, new TimeSpan(0, 0, RandomNumber(1, 60)));

                        SprintStoryRepository.Save(sprintStory);
                    }

                    num++;
                }*/
                SprintRepository.Save(sprint);
            }
            #endregion

            #region James Sprints
            num = 0;
            for (int i = 0; i < 4; i++)
            {
                Sprint sprint = new Sprint();
                sprint.Doel = "James SprintDoel #" + i.ToString();
                sprint.StartDatum = DateTime.Now.AddDays((4 * i));
                sprint.EindDatum = DateTime.Now.AddDays((4 * i) + 16);
                sprint.Project = project_James;
                SprintRepository.Save(sprint);

                SprintGebruiker sprintGebruiker = new SprintGebruiker(user1, sprint, SprintRol.ScrumMaster);
                SprintGebruiker sprintGebruiker2 = new SprintGebruiker(user3, sprint, SprintRol.Developer);
                SprintGebruikerRepository.Save(sprintGebruiker);
                SprintGebruikerRepository.Save(sprintGebruiker2);

                SprintRepository.Save(sprint);
                GebruikerRepository.Save(user2);
                GebruikerRepository.Save(user3);

                for (int y = 0; y < 3; y++)
                {
                    SprintStory sprintStory = sprint.MaakSprintStoryVoor(project_James.Stories[num]);

                    sprintStory.SprintBacklogPrioriteit = (Prioriteit)RandomNumber(0, 3);
                    SprintStoryRepository.Save(sprintStory);

                    if (sprintStory.Status != Status.NietOpgepakt)
                    {
                        // ook even wat werkuren toevoegen
                        sprintStory.Story.Tasks[RandomNumber(0, sprintStory.Story.Tasks.Count - 1)].MaakTijdRegistratie(user2, DateTime.Today, sprintStory.Sprint, new TimeSpan(0, 0, RandomNumber(1, 60)));
                        sprintStory.Story.Tasks[RandomNumber(0, sprintStory.Story.Tasks.Count - 1)].MaakTijdRegistratie(user3, DateTime.Today, sprintStory.Sprint, new TimeSpan(0, 0, RandomNumber(1, 60)));

                        SprintStoryRepository.Save(sprintStory);
                    }
                    num++;
                }
                SprintRepository.Save(sprint);
            }
            #endregion
            #endregion

            #region Impediments
            #region JelloScrum
            for (int i = 0; i < 10; i++)
            {
                Story impediment = new Story(project_JelloScrum, user3, null, StoryType.Impediment);
                impediment.Titel = "Impediment JelloScrum #" + i.ToString();
                impediment.Omschrijving = "JelloScrum Impediment omschrijving";
                impediment.VoegCommentaarBerichtToe("Ahum comment voor....." + i);
                StoryRepository.Save(impediment);
            }
            #endregion

            #region James
            for (int i = 0; i < 10; i++)
            {
                Story impediment = new Story(project_James, user2, null, StoryType.Impediment);
                impediment.Titel = "Impediment James #" + i.ToString();
                impediment.Omschrijving = "James Impediment omschrijving";
                impediment.VoegCommentaarBerichtToe("Ahum comment voor....." + i);
                StoryRepository.Save(impediment);
            }
            #endregion
            #endregion

            #region Bugs
            #region JelloScrum
            for (int i = 0; i < 10; i++)
            {
                Story bug = new Story(project_JelloScrum, user1, (Impact)RandomNumber(0, 4), StoryType.Bug);
                bug.HowtoDemo = "Bug demo description for JelloScrum #" + i.ToString();
                bug.Notitie = "Note " + i.ToString();
                bug.Omschrijving = "Description " + i.ToString();
                bug.Schatting = new TimeSpan(0);
                bug.Titel = "BUG JelloScrum #" + i.ToString();
                StoryRepository.Save(bug);
            }
            #endregion

            #region James
            for (int i = 0; i < 10; i++)
            {
                Story bug = new Story(project_James, user1, (Impact)RandomNumber(0, 4), StoryType.Bug);
                bug.HowtoDemo = "Bug demo description for James #" + i.ToString();
                bug.Notitie = "Note " + i.ToString();
                bug.Omschrijving = "Description " + i.ToString();
                bug.Schatting = new TimeSpan(0);
                bug.Titel = "BUG James #" + i.ToString();
                StoryRepository.Save(bug);
            }
            #endregion
            #endregion
            PropertyBag.Add("ready", true);
            RenderView("index");
        }
 public decimal GetTotalEffectiveHoursForSprint(Sprint sprint)
 {
     if (sprint == null)
         return TotalEffectiveHours;
     return Tasks.Where(t => t.CreatedAt >= sprint.StartDate && t.CreatedAt <= sprint.EndDate).Sum(t => t.EffectiveHours);
 }