Пример #1
0
        public void AddComment(Bug bug)
        {
            var workItemDao = new WorkItemDao
            {
                Id          = bug.Id,
                Description = bug.Description,
            };
            var workItemSql = OperationsHelper.BuildUpdateStatement(workItemDao.GetTableName(), nameof(workItemDao.Id),
                                                                    nameof(workItemDao.Description));

            AddChange(workItemSql, workItemDao, OperationType.UPDATE);

            var bugDao = new BugDao
            {
                Id = bug.Id,
                IntegratedInBuild = bug.IntegratedInBuild,
                FoundInBuild      = bug.FoundInBuild,
                SystemInfo        = bug.SystemInfo
            };
            var bugSql =
                OperationsHelper.BuildUpdateStatement(bugDao.GetTableName(), nameof(bug.Id),
                                                      nameof(bugDao.IntegratedInBuild), nameof(bugDao.FoundInBuild), nameof(bugDao.SystemInfo));

            AddChange(bugSql, bugDao, OperationType.UPDATE);
        }
Пример #2
0
        public void ModifyEffort(Bug bug)
        {
            var bugDao = new BugDao(bug);
            var bugSql =
                OperationsHelper.BuildUpdateStatement(bugDao.GetTableName(), nameof(bug.Id),
                                                      nameof(bugDao.EffortOriginalEstimate), nameof(bugDao.EffortRemaining),
                                                      nameof(bugDao.EffortCompleted));

            AddChange(bugSql, bugDao, OperationType.UPDATE);
        }
Пример #3
0
        public void ChangeState(Bug bug)
        {
            var workItemDao = new WorkItemDao
            {
                Id            = bug.Id,
                StateId       = (int)bug.State,
                StateReasonId = (int)bug.StateReason,
            };

            workItemDao.IncludeDomainEvents(bug.DomainEvents);

            var workItemSql = OperationsHelper.BuildUpdateStatement(workItemDao.GetTableName(), nameof(workItemDao.Id),
                                                                    nameof(workItemDao.StateId), nameof(workItemDao.StateReasonId));

            AddChange(workItemSql, workItemDao, OperationType.UPDATE);
        }
Пример #4
0
        public void ModifyPlanning(Bug bug)
        {
            var workItemDao = new WorkItemDao
            {
                Id         = bug.Id,
                PriorityId = (int)bug.Priority,
            };
            var workItemSql = OperationsHelper.BuildUpdateStatement(workItemDao.GetTableName(), nameof(workItemDao.Id),
                                                                    nameof(workItemDao.PriorityId));

            AddChange(workItemSql, workItemDao, OperationType.UPDATE);

            var bugDao = new BugDao(bug);
            var bugSql =
                OperationsHelper.BuildUpdateStatement(bugDao.GetTableName(), nameof(bug.Id),
                                                      nameof(bugDao.StoryPoints), nameof(bugDao.SeverityId), nameof(bugDao.ActivityId));

            AddChange(bugSql, bugDao, OperationType.UPDATE);
        }