//Delete the UserStory on the basis of the userStoryID
 public static List<UserStory> DeleteUserStory(UserStory s)
 {
     var us = (from userStory in dataContext.UserStories
                 where userStory.UserStoryID == s.UserStoryID
                 select userStory).SingleOrDefault();
     dataContext.UserStories.Remove(us);
     dataContext.SaveChanges();
     return GetAllUserStories();
 }
 public List<UserStory> UpdateUserStory(UserStory oldUS)
 {
     var userStory = (from us in dataContext.UserStories
                      where us.UserStoryID == oldUS.UserStoryID
                      select us).SingleOrDefault();
     userStory.Story = oldUS.Story;
     dataContext.SaveChanges();
     return GetAllUserStories();
 }
Пример #3
0
 public Text3DPlaneUS(string dato,GameObject padre,Vector3 posicion,Vector3 escala,int fontsize, string name, UserStory u)
     : base(dato,padre,posicion,escala,fontsize,name)
 {
     this.user=u;
     plano.GetComponent<Renderer>().material = (Material)Resources.Load("MaterialTransparente");
     plano.AddComponent<usPlaneBehavior>();
     usPlaneBehavior script = (usPlaneBehavior)plano.GetComponent("usPlaneBehavior");
     script.setCuboUS(this);
 }
Пример #4
0
 public void cargarEstimaciones(UserStory u, CuadriculaPoker c)
 {
     foreach (Estimacion e in u.getListaEstimacion()) {
         Carta card = new Carta(e);
         card.setFont(fontTexto);
         card.setMaterial(materialTexto);
         c.addElemento(card);
     }
 }
Пример #5
0
        public void CRUDUserStoryTest()
        {
            ctrl.CreateProject("aProjectName", "A Description for my project", DateTime.Now);
            Project project = ctrl.Projects.Last();

            string   firstDesc       = "aDesc";
            DateTime?firstDate       = DateTime.Now;
            int      firstComplexity = 2;
            Priority firstPrio       = ctrl.Priorities[0];

            Classes.Type firstType = ctrl.Types[0];


            Assert.IsTrue(ctrl.CreateUserStory(firstDesc, firstDate, firstComplexity, firstPrio, firstType, project));
            UserStory userStory = project.AllUserStories[0];

            Assert.IsNotNull(userStory, "Exception in userStory creation");
            Assert.AreEqual(firstDesc, userStory.Description);
            Assert.AreEqual(firstDate, userStory.DateLimit);
            Assert.AreEqual(firstComplexity, userStory.ComplexityEstimation);
            Assert.AreEqual(firstPrio, userStory.Priority);
            Assert.AreEqual(firstType, userStory.Type);
            Assert.AreEqual(project, userStory.Project);
            Assert.AreEqual(false, userStory.Blocked);
            Assert.AreEqual(0, userStory.CompletedComplexity);


            string   secDesc       = "aNewDesc";
            DateTime?secDate       = null;
            int      secComplexity = 3;
            int      secCompleted  = 1;
            bool     secBlock      = true;
            Priority secPrio       = ctrl.Priorities[1];

            Classes.Type secType = ctrl.Types[1];
            while (ctrl.States.Count < 2)
            {
                ctrl.CreateState("An additional state name");
            }
            State secState = ctrl.States.Last();

            Assert.IsTrue(ctrl.UpdateUserStory(secDesc, secDate, secComplexity, secCompleted, secBlock, secPrio, secType, secState, userStory));

            Assert.AreEqual(secDesc, userStory.Description);
            Assert.AreEqual(secDate, userStory.DateLimit);
            Assert.AreEqual(secComplexity, userStory.ComplexityEstimation);
            Assert.AreEqual(secPrio, userStory.Priority);
            Assert.AreEqual(secType, userStory.Type);
            Assert.AreEqual(secState, userStory.State);
            Assert.AreEqual(secBlock, userStory.Blocked);
            Assert.AreEqual(secCompleted, userStory.CompletedComplexity);

            Assert.IsTrue(ctrl.Delete(userStory));

            ctrl.Delete(project);
        }
Пример #6
0
        public IHttpActionResult CreateQuickProjectStory(int projectId, UserStory model)
        {
            if (projectId != model.ProjectId)
            {
                return(NotFound());
            }

            model.RequestDate = DateTime.Now;

            if (ModelState.IsValid)
            {
                var transaction = _repoFactory.BeginTransaction();
                try
                {
                    var newStoryId = _repoFactory.ProjectStories.CreateProjectStory(model, transaction);
                    if (newStoryId.HasValue)
                    {
                        model.StoryId = newStoryId.Value;
                        if (!string.IsNullOrWhiteSpace(model.SprintIds))
                        {
                            var sprintIds = model.SprintIds.Split(',');
                            foreach (var s in sprintIds)
                            {
                                if (int.TryParse(s, out var sprintId))
                                {
                                    _repoFactory.Sprints.AddStoryToSprint(sprintId, model.StoryId, transaction);
                                }
                            }
                        }
                        _repoFactory.CommitTransaction();

                        if (!string.IsNullOrWhiteSpace(model.AssignedToUserId) &&
                            !string.Equals(model.AssignedToUserId, UserId, System.StringComparison.OrdinalIgnoreCase))
                        {
                            var receipientName = _cacheService.GetUserName(model.AssignedToUserId);
                            if (!string.IsNullOrWhiteSpace(receipientName))
                            {
                                var receipient    = new MailUser(model.AssignedToUserId, receipientName);
                                var actor         = new MailUser(UserId, DisplayName);
                                var userStoryLink = UrlFactory.GetUserStoryPageUrl(projectId, model.StoryId);
                                _emailService.SendMail(receipient, Core.Enumerations.EmailType.UserStoryAssigned, actor, userStoryLink);
                            }
                        }

                        return(Created($"/api/{projectId}/projectstories/{model.StoryId}", model));
                    }
                }
                catch (System.Exception ex)
                {
                    _repoFactory.RollbackTransaction();
                    _logger.Error(ex, Request.RequestUri.ToString());
                    return(InternalServerError(ex));
                }
            }
            return(BadRequest(ModelState));
        }
Пример #7
0
        public void Set_and_unset_dates_depending_on_status(IStoryService storyService)
        {
            // arrange
            var       createdOn = DateTime.Now;
            UserStory story     = new UserStory()
            {
                Role      = "X",
                Want      = "Y",
                Status    = "Backlog",
                Sequence  = 1,
                CreatedOn = createdOn
            };

            using (new AssertionScope())
            {
                story.CreatedOn.Should().Be(createdOn);
                story.StartedOn.Should().BeNull($"Status is {story.Status}");
                story.CompletedOn.Should().BeNull($"Status is {story.Status}");

                story.Status = "In Process";
                story        = storyService.SaveStory(story);
                story.CreatedOn.Should().Be(createdOn);
                story.StartedOn.Should().NotBeNull($"Status is {story.Status}");
                story.CompletedOn.Should().BeNull($"Status is {story.Status}");

                story.Status = "Waiting";
                story        = storyService.SaveStory(story);
                story.CreatedOn.Should().Be(createdOn);
                story.StartedOn.Should().NotBeNull($"Status is {story.Status}");
                story.CompletedOn.Should().BeNull($"Status is {story.Status}");

                story.Status = "Done";
                story        = storyService.SaveStory(story);
                story.CreatedOn.Should().Be(createdOn);
                story.StartedOn.Should().NotBeNull($"Status is {story.Status}");
                story.CompletedOn.Should().NotBeNull($"Status is {story.Status}");

                story.Status = "Waiting";
                story        = storyService.SaveStory(story);
                story.CreatedOn.Should().Be(createdOn);
                story.StartedOn.Should().NotBeNull($"Status is {story.Status}");
                story.CompletedOn.Should().BeNull($"Status is {story.Status}");

                story.Status = "In Process";
                story        = storyService.SaveStory(story);
                story.CreatedOn.Should().Be(createdOn);
                story.StartedOn.Should().NotBeNull($"Status is {story.Status}");
                story.CompletedOn.Should().BeNull($"Status is {story.Status}");

                story.Status = "Backlog";
                story        = storyService.SaveStory(story);
                story.CreatedOn.Should().Be(createdOn);
                story.StartedOn.Should().BeNull($"Status is {story.Status}");
                story.CompletedOn.Should().BeNull($"Status is {story.Status}");
            }
        }
Пример #8
0
        //
        // GET: /Sprint/Details/5

        public ActionResult Details(int id = 0)
        {
            UserStory userstory = db.UserStories.Find(id);

            if (userstory == null)
            {
                return(HttpNotFound());
            }
            return(View(userstory));
        }
        public async Task <IActionResult> MoveUserStoryBackward(int id)
        {
            UserStory story = _context.UserStories.FirstOrDefault(i => i.Id == id);

            _fakeUserStoriesRepository.MoveUserStoryBackward(story);
            _context.Update(story);
            await _context.SaveChangesAsync();

            return(RedirectToAction(nameof(Index)));
        }
Пример #10
0
        public ActionResult EditStory(int?id)
        {
            OPTDBContext          dbEntities = new OPTDBContext();
            UserStory             story      = dbEntities.UserStories.Find(id);
            List <SelectListItem> projects   = GetProjectList();

            projects.Find(p => p.Value == story.ProjectID.ToString()).Selected = true;
            ViewBag.Projects = projects;
            return(View(story));
        }
Пример #11
0
        public FileMenu(UserStory aUserStory, Controller aController)
        {
            userStory  = aUserStory;
            controller = aController;


            InitializeComponent();

            Refresh();
        }
Пример #12
0
 private void listView_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (UserStoryListView.SelectedItem != null)
     {
         obj       = UserStoryListView.SelectedValue;
         userStory = obj as UserStory;
         ViewTaskViewModel._staticUserStory = userStory;
     }
     this.Frame.Navigate(typeof(ListOfTasksPage));
 }
Пример #13
0
        public static void EditUser(UserStory Emp)
        {
            MainDBC   db = new MainDBC();
            UserStory em = User_search_id(Emp);

            em.userstoryid = Emp.userstoryid;
            em.story       = Emp.story;
            em.proid       = Emp.proid;
            db.SaveChanges();
        }
Пример #14
0
        private async Task <string> CreateUserStoryAsync(UserStory userStory)
        {
            var response = await client.PostAsJsonAsync("api/UserStory", userStory).ConfigureAwait(false);

            var result = await CheckResponse(response).ConfigureAwait(false);

            var userStoryId = await response.Content.ReadAsStringAsync().ConfigureAwait(false);

            return(userStoryId.Substring(1, userStoryId.Length - 2));
        }
Пример #15
0
        public bool EditUserStory(int id, UserStory story)
        {
            var userStory = db.UserStories.Where(ustory => ustory.userStoryId == id).FirstOrDefault();

            userStory.story  = story.story;
            userStory.projId = story.projId;

            db.SaveChanges();
            return(true);
        }
Пример #16
0
        public bool CreateActivity(string description, UserStory userStory)
        {
            //create, check, assign values and return
            Activity activity = DB.CreateActivity(description, DateTime.Now, userStory);
            bool     result   = activity != null;

            userStory.Activities.Add(activity);
            activity.UserStory = userStory;
            return(result);
        }
Пример #17
0
        public void TestUserStoryReadRequirement()
        {
            UserStory userStory      = new UserStory();
            string    elementToParse = "pr1 us1 aaa";

            userStory.ReadRequirement(elementToParse);
            UserStory expectedUserStory = new UserStory("pr1", "us1", "aaa");

            Assert.AreEqual(userStory.ToString(), expectedUserStory.ToString());
        }
Пример #18
0
        public List <UserStory> DeleteUserStory(UserStory oldUS)
        {
            var userStory = (from us in dataContext.UserStories
                             where us.UserStoryID == oldUS.UserStoryID
                             select us).SingleOrDefault();

            dataContext.UserStories.Remove(userStory);
            dataContext.SaveChanges();
            return(GetAllUserStories());
        }
 public void SetupTest()
 {
     this.taskUnderTest = new HiringCompanyData.Task();
     name                = "";
     progress            = 0;
     description         = "";
     taskState           = TaskState.New;
     developmentEngineer = new Employee();
     userStory           = new UserStory();
 }
Пример #20
0
        public Checklist CreateCheckList(string aName, UserStory aUserStory)
        {
            //Create, assign values and create activity
            Checklist checklist = DB.CreateCheckList(aName, aUserStory);

            aUserStory.Checklists.Add(checklist);
            checklist.UserStory = aUserStory;
            CreateActivity(string.Format("La checklist \"{0}\" a été créée", checklist), aUserStory);
            return(checklist);
        }
Пример #21
0
        public string CreateUserStory(ServiceModel.UserStory userStory)
        {
            var dataUserStory = new UserStory(userStory.Title, userStory.Description);

            dataUserStory.Project = projectRepository.GetByID(userStory.ProjectId);
            repository.Insert(dataUserStory);
            dataUserStory.Priority = (dataUserStory.Project.ProjectUserStories.Count());
            repository.Save();
            return(dataUserStory.Id.ToString());
        }
Пример #22
0
 public void SetUp()
 {
     defineUserStoriesViewModel = new DefineUserStoriesViewModel();
     acceptUserStoryCommand     = new AcceptUserStoryCommand();
     rejectedUserStoryCommand   = new RejectUserStoryCommand();
     string           descr = defineUserStoriesViewModel.Description;
     List <UserStory> uss   = defineUserStoriesViewModel.UserStories;
     Project          pr    = defineUserStoriesViewModel.Project;
     UserStory        us    = defineUserStoriesViewModel.UserStory;
 }
Пример #23
0
        public void UpdateUserStory(UserStory userStory, int boardId, bool backlog)
        {
            if (userStory != null)
            {
                foreach (Board board in boardJsonService.GetJsonObjects())
                {
                    if (board.Id == boardId)
                    {
                        Debug.WriteLine($"\n------Updating User Story: {userStory.Name}\n Entered board: {boardId}\n");

                        if (!backlog)
                        {
                            for (int i = 0; i < board.UserStoriesOnBoard.Count; i++)
                            {
                                if (board.UserStoriesOnBoard[i].Id == userStory.Id)
                                {
                                    board.UserStoriesOnBoard[i] = userStory;

                                    UpdateBoard(board);

                                    Debug.WriteLine($"\n------Updated User Story: {userStory.Name}\n ID: {userStory.Id}\n - On board: {userStory.BoardId}\n");
                                    break;
                                }
                            }
                        }
                        else
                        {
                            for (int i = 0; i < board.BoardBacklog.UserStoriesInBacklog.Count; i++)
                            {
                                if (board.BoardBacklog.UserStoriesInBacklog[i].Id == userStory.Id)
                                {
                                    // Set column ID to the importance level - ONLY BECAUSE THIS IS IN THE BACKLOG
                                    if (userStory.Priority >= 0 && userStory.Priority < 4)
                                    {
                                        userStory.ColumnId = userStory.Priority;
                                    }
                                    else
                                    {
                                        userStory.ColumnId = 0;
                                    }

                                    // Update the user story in the list
                                    board.BoardBacklog.UserStoriesInBacklog[i] = userStory;

                                    UpdateBoard(board);

                                    Debug.WriteLine($"\n------Updated User Story: {userStory.Name}\n ID: {userStory.Id}\n - On board: {userStory.BoardId}\n - In backlog?: {backlog}");
                                    break;
                                }
                            }
                        }
                    }
                }
            }
        }
        public void Object_Id_Has_A_Value_Of_Null_If_No_Value_Provided()
        {
            // Arrange

            // Act
            var story = new UserStory();

            Console.WriteLine(story.Id);
            // Assert
            Assert.That(story.Id, Is.Null);
        }
Пример #25
0
        public void Must_Have_Title()
        {
            // Arrange
            string title = "a title";

            // Act
            var result = new UserStory("1", title);

            // Arrange
            Assert.AreEqual(result.Title, title);
        }
        public void Object_Id_Pid_Is_Null_If_No_Value_Given()
        {
            // Arrange

            // Act
            var story = new UserStory();


            // Assert
            Assert.That(story.Id, Is.Null);
        }
Пример #27
0
 public ActionResult Edit([Bind(Include = "UserStoryID,StoryName,StoryText,ProjectID")] UserStory userStory)
 {
     if (ModelState.IsValid)
     {
         db.Entry(userStory).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.UserStoryID = new SelectList(db.Projects, "ID", "ProjectName", userStory.UserStoryID);
     return(View(userStory));
 }
Пример #28
0
        public IHttpActionResult GetUserStory(int id)
        {
            UserStory userStory = service.GetUserStoryById(id);

            if (userStory == null)
            {
                return(NotFound());
            }

            return(Ok(userStory));
        }
Пример #29
0
 private static UserStoryBodyProperties ToBodyProperties(this UserStory userStory)
 {
     return(new UserStoryBodyProperties()
     {
         Role = userStory.Role,
         Want = userStory.Want,
         Why = userStory.Why,
         Discussion = userStory.Discussion,
         AcceptanceCriteria = userStory.AcceptanceCriteria
     });
 }
Пример #30
0
        /// <summary>
        /// Sets <see cref="UserStory.Id"/> if empty or null.
        /// </summary>
        /// <param name="userStory"></param>
        public static void WriteUserStory(UserStory userStory)
        {
            if (String.IsNullOrWhiteSpace(userStory.Id))
            {
                userStory.Id = Path.GetFileNameWithoutExtension(Path.GetRandomFileName());
            }
            string filePath = GetFilePath(userStory.Id);
            string text     = GetFileContents(userStory);

            File.WriteAllText(filePath, text);
        }
Пример #31
0
        public async Task <IActionResult> Create([Bind("UserStoryId,Titulo,Descripcion,CriteriosAceptacion,OrdenPrioridad,Valor,FechaInicio,DuracionEstimada,FechaFin")] UserStory userStory)
        {
            if (ModelState.IsValid)
            {
                _context.Add(userStory);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(userStory));
        }
Пример #32
0
        /// Updates a particular User Story
        /// </summary>
        /// <param name="userStory">User Story to be updated</param>
        /// <returns>Updated User Story</returns>
        public UserStory UpdateUserStory(long projectId, long userStoryId, UserStory userStory)
        {
            var request = new RestRequest("/project/" + projectId + "/story/" + userStoryId, Method.PUT);

            request.AddHeader("Content-Type", "application/json");
            request.RequestFormat = DataFormat.Json;
            request.AddBody(userStory);
            SimpleJson.CurrentJsonSerializerStrategy = new CamelCaseSerializationStrategy();

            return(Execute <UserStory>(request));
        }
Пример #33
0
        public void User_story_can_be_set_to_first_and_last_position()
        {
            var userStory = new UserStory(5);
            var edge      = new Edge();

            edge.SetPosition(1, userStory);
            edge.SetPosition(5, userStory);

            Assert.That(edge.GetStoryOnPosition(1), Is.EqualTo(userStory));
            Assert.That(edge.GetStoryOnPosition(5), Is.EqualTo(userStory));
        }
Пример #34
0
        public void Update(ICommand<UserStoryIdentity> command, Action<UserStory> methodToCall)
        {
            var changes = eventStore.GetStream(command.Identity);

            var userStoryState = new UserStoryState(changes);
            var userStory = new UserStory(userStoryState);
            methodToCall(userStory);

            eventStore.AppendToStream(command.Identity, userStory.Changes);
            eventsPublisher.Publish(userStory.Changes);
        }
Пример #35
0
        public IActionResult Create(UserStory userStory)
        {
            if (ModelState.IsValid)
            {
                _exampleMappingContext.UserStories.Add(userStory);
                _exampleMappingContext.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(userStory));
        }
 public IHttpActionResult Put(UserStory p)
 {
     var usrStoriess = UserStoryRepository.UpdateUserStory(p);
     if (usrStoriess != null)
     {
         return Ok(usrStoriess);
     }
     else
     {
         return NotFound();
     }
 }
        //Update the UserStory  on the basis of the userStoryID
        public static List<UserStory> UpdateUserStory(UserStory s)
        {
            //get the details of the userStory
            var us = (from userStory in dataContext.UserStories
                        where userStory.UserStoryID == s.UserStoryID
                        select userStory).SingleOrDefault();

            us.Story = s.Story;
            us.ProjectID = s.ProjectID;

            dataContext.SaveChanges();
            return GetAllUserStories();
        }
Пример #38
0
 public void addStory(UserStory aux)
 {
     foreach (UserStory u in stories){
         if (u.getDescripcion().Equals("")){
             u.setDescripcion(aux.getDescripcion());
             u.setId_Sprint(0);
             u.setId_UserStory(aux.getId_UserStory());
             u.setPrioridad(aux.getPrioridad());
             u.setTitulo(aux.getTitulo());
             return;
         }
     }
     stories.Add(aux);
     cont++;
     completarStories();
 }
Пример #39
0
 public PokerUS(UserStory u)
     : base(u)
 {
 }
Пример #40
0
 public void setUserStory(UserStory us)
 {
     u = us;
 }
Пример #41
0
    private void completarStories()
    {
        while ((cont % 5) != 0){
        //			Debug.Log("Porcentaje"+ cont % 5);
            UserStory aux = new UserStory();
            aux.setTitulo("");
            aux.setPrioridad(0);
            aux.setId_UserStory(0);
            aux.setDescripcion("");
            aux.setId_Sprint(0);
            stories.Add(aux);
            cont++;

        }
    }
Пример #42
0
 public void modificarEstimacionUS(SFSObject dataObject)
 {
     UserStory us = new UserStory();
     us.fromSFSObject(dataObject);
     Sprint sprint0 = (Sprint)listaSprints[0];
     foreach(UserStory u in sprint0.getListaStories()){
         if (u.getId_UserStory().Equals(us.getId_UserStory()))
             u.setValorEstimacion(us.getValorEstimacion());
     }
     poker.inicializar();
     backlog.cargarVector();
     backlog.cargarInicial();
 }
Пример #43
0
 public void setUserStory(UserStory u)
 {
     user= u;
 }
Пример #44
0
        /// <summary>
        /// Generates a view of User Stories for a project rolled up to the story level
        /// </summary>
        /// <param name="stories">Original list of User Stories for project</param>
        /// <param name="DateToCalc">Date to create rollup for</param>
        public static List<UserStory> CreateDailyRollup(List<UserStory> stories, DateTime DateToCalc)
        {
            List<UserStory> rollup = new List<UserStory>();

            foreach (UserStory story in stories)
            {
                UserStory newstory = new UserStory();
                newstory.Blocked = story.Blocked;
                newstory.Children = story.Children;
                newstory.Description = story.Description;
                newstory.FormattedID = story.FormattedID;
                newstory.Iteration = story.Iteration;
                newstory.Name = story.Name;
                newstory.Owner = story.Owner;
                newstory.ParentEpic = story.ParentEpic;
                newstory.ParentProject = story.ParentProject;
                newstory.Release = story.Release;
                newstory.State = story.State;
                newstory.Tasks = story.Tasks;
                newstory.StoryActual = TaskTotal(story.Tasks, ProjectTotal.Actual, DateToCalc);
                newstory.StoryEstimate = TaskTotal(story.Tasks, ProjectTotal.Estimate, DateToCalc);
                newstory.StoryToDo = TaskTotal(story.Tasks, ProjectTotal.ToDo, DateToCalc);
                newstory.PlanEstimate = story.PlanEstimate;
                if (newstory.StoryActual != 0)
                {
                    rollup.Add(newstory);
                }
            }

            return rollup;
        }
Пример #45
0
        /// <summary>
        /// Grabs all User Stories for the indicated parent.  The parent can be an Epic or another User Story
        /// </summary>
        /// <param name="ParentID">Formatted ID of the Parent</param>
        /// <param name="ParentName">Name of the parent, specifically the Epic name</param>
        /// <param name="RootParent">Indicates if the parent is the top-level User Story or not.  If looking for sub-stories, things are handled differently</param>
        public static List<UserStory> GetUserStoriesPerParent(string ParentID, string ParentName, bool RootParent)
        {
            List<UserStory> listReturn = new List<UserStory>();

            // Grab all UserStories under the given Epic
            LogOutput("Using RallyAPI to request story information for all parents...", "GetUserStoriesPerParent", true);
            LogOutput("Building Rally Request...", "GetUserStoriesPerParent", true);
            Request rallyRequest = new Request("HierarchicalRequirement");
            rallyRequest.Fetch = new List<string>() { "Name", "FormattedID", "Release", "Iteration", "Blocked",
                "Owner", "ScheduleState", "DirectChildrenCount", "Description", "PlanEstimate" };
            // If this is the "Root" or highest order User Story, then we want to grab by the FormattedID of the actual portfolio
            // item.  If this is a subordinate, then we want to grab everything where the PARENT object is the FormattedID that
            // we passed into the method
            if (RootParent)
            {
                rallyRequest.Query = new Query("PortfolioItem.FormattedID", Query.Operator.Equals, ParentID);
            }
            else
            {
                rallyRequest.Query = new Query("Parent.FormattedID", Query.Operator.Equals, ParentID);
            }
            LogOutput("Running Rally Query request...", "GetUserStoriesPerParent", true);
            QueryResult rallyResult = RallyAPI.Query(rallyRequest);
            LogOutput("Looping through Query request...", "GetUserStoriesPerParent", true);
            foreach (var result in rallyResult.Results)
            {
                UserStory story = new UserStory();
                story.Name = RationalizeData(result["Name"]);
                story.FormattedID = RationalizeData(result["FormattedID"]);
                story.Owner = RationalizeData(result["Owner"]);
                story.Release = RationalizeData(result["Release"]);
                story.Iteration = RationalizeData(result["Iteration"]);
                story.State = RationalizeData(result["ScheduleState"]);
                story.Children = RationalizeData(result["DirectChildrenCount"]);
                story.Description = RationalizeData(result["Description"]);
                story.ParentProject = ParentID;
                story.ParentEpic = ParentName;
                story.PlanEstimate = RationalizeData(result["PlanEstimate"], true);
                story.Tasks = GetTasksForUserStory(story.FormattedID);
                story.Blocked = RationalizeData(result["Blocked"]);
                LogOutput("Appending new story object to return list...", "GetUserStoriesPerParent", true);
                listReturn.Add(story);
                LogOutput(story.FormattedID + " " + story.Name, "GetUserStoriesPerParent", true);

                // Check for children.  If there are children, then we need to drill down
                // through all children to retrieve the full list of stories
                if (story.Children > 0)
                {
                    // Recursively get child stories until we reach the lowest level
                    listReturn.AddRange(GetUserStoriesPerParent(story.FormattedID.Trim(), "", false));
                }
            }

            LogOutput("Completed processing all stories, returning list", "GetUserStoriesPerParent", true);

            return listReturn;
        }
Пример #46
0
 public void addUserStory(UserStory u)
 {
     listaStories.Add(u);
 }
 public IEnumerable<UserStory> Delete(UserStory us)
 {
     return repository.DeleteUserStory(us);
 }
Пример #48
0
 public Text3DCuboUS(UserStory u)
     : base(u.getTitulo())
 {
     this.user=u;
 }
Пример #49
0
    public void recorrerTareas(UserStory u, CuadriculaCompleja c)
    {
        foreach (Task t in u.getListaTareas()) {
            Text3DCubo cubotarea = new Text3DCuboTask (t);
            cubotarea.setMaterial (materialTexto);
            cubotarea.setFont (fontTexto);
            switch (t.getEstado ()) {
            case "TO DO":
                c.addElementoToDo (cubotarea);
                break;
            case "DOING":
                c.addElementoDoing (cubotarea);
                break;
            case "ON TEST":
                c.addElementoOnTest(cubotarea);
                break;
            case "DONE":
                c.addElementoDone (cubotarea);
                break;
            }

        }
    }
Пример #50
0
    void OnMouseUp()
    {
        Task t1 = new Task();
        t1.setId_Task(1);
        t1.setDescripcion("Esta es una tarea de prueba, que tal?");
        t1.setResponsable("Nicola");
        t1.setEstado("TO DO");
        t1.setT_Estimado(2);
        t1.setT_Total(1);
        t1.setPrioridad(2);

        Task t2 = new Task();
        t2.setId_Task(2);
        t2.setDescripcion("Esta es una tarea de prueba, que tal?");
        t2.setResponsable("Chupe");
        t2.setEstado("TO DO");
        t2.setT_Estimado(2);
        t2.setT_Total(1);
        t2.setPrioridad(2);

        Task t3 = new Task();
        t3.setId_Task(3);
        t3.setDescripcion("Esta es una tarea de prueba, que tal?");
        t3.setResponsable("Ari");
        t3.setEstado("TO DO");
        t3.setT_Estimado(2);
        t3.setT_Total(1);
        t3.setPrioridad(2);

        Task t4 = new Task();
        t4.setId_Task(4);
        t4.setDescripcion("Esta es una tarea de prueba, que tal?");
        t4.setResponsable("Ari");
        t4.setEstado("TO DO");
        t4.setT_Estimado(2);
        t4.setT_Total(1);
        t4.setPrioridad(2);

        Task t5 = new Task();
        t5.setId_Task(5);
        t5.setDescripcion("Esta es una tarea de prueba, que tal?");
        t5.setResponsable("Ari");
        t5.setEstado("TO DO");
        t5.setT_Estimado(2);
        t5.setT_Total(1);
        t5.setPrioridad(2);

        Task t6 = new Task();
        t6.setId_Task(6);
        t6.setDescripcion("Esta es una tarea de prueba, que tal?");
        t6.setResponsable("Ari");
        t6.setEstado("TO DO");
        t6.setT_Estimado(2);
        t6.setT_Total(1);
        t6.setPrioridad(2);

        //g.AddComponent("GUI_DetalleTarea");
        UserStory u = new UserStory();
        ArrayList lista = new ArrayList();
        lista.Add(t1);
        lista.Add(t2);
        lista.Add(t3);
        lista.Add(t4);
        lista.Add(t5);
        lista.Add(t6);
        lista.Add(t1);
        lista.Add(t2);
        lista.Add(t3);
        lista.Add(t4);
        lista.Add(t5);
        lista.Add(t6);
        u.setId_UserStory(123);
        u.setListaTareas(lista);
        u.setDescripcion("Esta es una User Story de prueba, que tal? hhhhhhhhhhhhhhhhhhhhhhhoooooooooooooooooooooooooooooolaaaaaaaaaaaaaaaaa");
        u.setPrioridad(2);
        //		u.dibujar();
    }
Пример #51
0
 async void getUserStories(string uri)
 {
     if (string.IsNullOrWhiteSpace(uri))
     {
         uri = string.Format("{0}/api/v1/UserStories?acid={1}&format=xml&include={2}&where={3}", targetProcessServer, acid, Uri.EscapeDataString(USERSTORY_INCLUDE), Uri.EscapeDataString(USERSTORY_WHERE));
     }
     var req = await client.GetAsync(new Uri(uri));
     if (req.IsSuccessStatusCode)
     {
         string responseText = await req.Content.ReadAsStringAsync();
         var doc = XDocument.Parse(responseText);
         req.Dispose();
         foreach (XElement UserStory in doc.Root.Elements("UserStory"))
         {
             XElement CreateDate = UserStory.Element("CreateDate");
             XElement StartDate = UserStory.Element("StartDate");
             XElement EndDate = UserStory.Element("EndDate");
             XElement Feature = UserStory.Element("Feature");
             UserStory u = new UserStory();
             u.id = int.Parse(UserStory.Attribute("Id").Value);
             u.name = UserStory.Attribute("Name").Value;
             XAttribute FeatureId = Feature != null ? Feature.Attribute("Id") : null;
             u.featureId = FeatureId != null ? int.Parse(Feature.Attribute("Id").Value) : 0;
             if (features.ContainsKey(u.featureId))
             {
                 u.featureName = features[u.featureId].name;
             }
             if (!string.IsNullOrWhiteSpace(u.featureName))
             {
                 u.title = string.Format("{0} in {1}", u.name, u.featureName);
             }
             else
             {
                 u.title = u.name;
             }
             u.createdate = DateTime.Parse(CreateDate.Value);
             u.opened = Math.Max(0, (int)((u.createdate - start).Days / 7));
             if (StartDate != null && !string.IsNullOrWhiteSpace(StartDate.Value))
             {
                 u.startdate = DateTime.Parse(StartDate.Value);
                 u.started = Math.Max(u.opened, (int)((u.startdate.Value - start).Days / 7));
                 if (EndDate != null && !string.IsNullOrWhiteSpace(EndDate.Value))
                 {
                     u.enddate = DateTime.Parse(EndDate.Value);
                     u.closed = Math.Max(u.started, (int)((u.enddate.Value - start).Days / 7));
                 }
                 else
                 {
                     u.enddate = null;
                     u.closed = -1;
                 }
             }
             else
             {
                 u.startdate = null;
                 u.started = -1;
                 u.enddate = null;
                 u.closed = -1;
             }
             userStories.Add(u);
         }
         XAttribute Next = doc.Root.Attribute("Next");
         if (Next != null && !string.IsNullOrWhiteSpace(Next.Value))
         {
             getUserStories(Next.Value);
         }
         else
         {
             showData();
         }
     }
     else
     {
         progressRing.IsActive = false;
         var popup = new MessageDialog("Check username/password and try again.", "Access denied");
         req.Dispose();
         await popup.ShowAsync();
         client.Dispose();
         resetUserNamePasswordField();
     }
 }
Пример #52
0
    public override void fromSFSObject(SFSObject item)
    {
        this.id_sprint=item.GetLong("Id_Sprint");
        this.id_proyecto=item.GetLong("id_Proyecto");
        this.estado=item.GetUtfString("estado");
        this.fechaInicio=System.DateTime.Parse(item.GetUtfString("fechaInicio"));//new System.DateTime(us.GetLong ("fechaInicio"));
        this.fechaFin=System.DateTime.Parse(item.GetUtfString("fechaFin"));//new System.DateTime(us.GetLong ("fechaFin"));
        this.titulo=item.GetUtfString("titulo");
        this.cerrado = item.GetBool("cerrado");
        string s = item.GetUtfString ("fecha_ultimo_cambio");
        if(!s.Equals(""))
            this.fecha_ultimo_cambio = System.DateTime.Parse(s);
        ISFSArray stories=item.GetSFSArray("listaStories");
        foreach(SFSObject story in stories)
        {
            UserStory UserStory=new UserStory();
            UserStory.fromSFSObject(story);

            listaStories.Add(UserStory);
        }
        Debug.Log (this.fecha_ultimo_cambio.ToString ());
    }
Пример #53
0
 public void agregarSprint(SFSObject dataObject)
 {
     Sprint sprint=new Sprint();
     Sprint sprint0 = (Sprint)listaSprints[0];
     sprint.fromSFSObjectSinUS(dataObject);
     ISFSArray stories=dataObject.GetSFSArray("listaStories");
      	foreach(SFSObject story in stories)
     {
         UserStory userStory=new UserStory();
         userStory.fromSFSObject(story);
         sprint.addUserStory(sprint0.removeUserStory(userStory.getId_UserStory()));
     }
     listaSprints.Add(sprint);
     crearPlanoTask planoTask = (crearPlanoTask)(GameObject.Find("panelTaskBoard")).GetComponent("crearPlanoTask");
     planoTask.inicializar(listaSprints);
 }
Пример #54
0
 public void agregarUserStory(SFSObject dataObject)
 {
     Sprint sprint0 = (Sprint)listaSprints[0];
     UserStory story = new UserStory();
     story.fromSFSObject(dataObject);
     sprint0.addUserStory(story);
     backlog.cargarVector();
     backlog.cargarInicial();
     poker.inicializar();
 }
Пример #55
0
        /// <summary>
        /// This reads all defects for the supplied User Story
        /// </summary>
        /// <param name="Parent">User Story to get all defects for</param>
        public static List<Defect> GetDefectsForStory(UserStory Parent)
        {
            List<Defect> listReturn = new List<Defect>();

            // Grab all Defects under the given User Story
            LogOutput("Using RallyAPI to request defect information for all stories...", "GetDefectsForStory", true);
            LogOutput("Building Rally Request...", "GetDefectsForStory", true);
            Request rallyRequest = new Request("Defect");
            rallyRequest.Fetch = new List<string>() { "Name", "FormattedID", "Description", "Iteration", "Owner",
                "Release", "State", "Blocked", "BlockedReason" };
            rallyRequest.Query = new Query("Requirement.Name", Query.Operator.Equals, Parent.Name.Trim());
            LogOutput("Running Rally Query request...", "GetDefectsForStory", true);
            QueryResult rallyResult = RallyAPI.Query(rallyRequest);
            LogOutput("Looping through Query request...", "GetDefectsForStory", true);
            foreach (var result in rallyResult.Results)
            {
                Defect defect = new Defect();
                defect.Name = RationalizeData(result["Name"]);
                defect.FormattedID = RationalizeData(result["FormattedID"]);
                defect.Description = RationalizeData(result["Description"]);
                defect.Iteration = RationalizeData(result["Iteration"]);
                defect.Owner = RationalizeData(result["Owner"]);
                defect.Release = RationalizeData(result["Release"]);
                defect.State = RationalizeData(result["State"]);
                defect.ParentStory = Parent.FormattedID.Trim();
                defect.Tasks = GetTasksForUserStory(defect.FormattedID);
                defect.Blocked = RationalizeData(result["Blocked"]);
                defect.BlockedReason = RationalizeData(result["BlockedReason"]);
                LogOutput("Appending new defect object to return list...", "GetDefectsForStory", true);
                listReturn.Add(defect);
            }

            LogOutput("Completed processing all defects, returning list", "GetDefectsForStory", true);

            return listReturn;
        }
Пример #56
0
 public void cambiarValorEstimacion(UserStory s)
 {
     smartFox.Send(new ExtensionRequest("modificarValorEstimacionUS",s.toSFSObject()));
 }
 public IEnumerable<UserStory> Put(UserStory us)
 {
     return repository.UpdateUserStory(us);
 }
Пример #58
0
 public void modificarEstadoEstimacionUS(SFSObject dataObject)
 {
     UserStory us = new UserStory();
     us.fromSFSObject(dataObject);
     Sprint sprint0 = (Sprint)listaSprints[0];
     foreach(UserStory u in sprint0.getListaStories()){
         if (u.getId_UserStory().Equals(us.getId_UserStory())){
             u.setEstadoEstimacion(us.getEstadoEstimacion());
             if (u.getEstadoEstimacion() == 1)
                 u.limpiarListaEstimacion();
         }
     }
     poker.inicializar();
 }
Пример #59
0
 public void setStory(UserStory story)
 {
     u = story;
 }
 //Insert UserStory
 public static List<UserStory> InsertUserStory(UserStory s)
 {
     dataContext.UserStories.Add(s);
     dataContext.SaveChanges();
     return GetAllUserStories();
 }