private void SetupDifferences()
        {
            WorkItemTypeDefinition workItemTypeDefinition;
            WitdField field;
            WitdState state;
            using (var template = EmbeddedProcessTemplate.Scrum2())
            {
                var templateReader = new ProcessTemplateReader(template.TemplatePath);
                workItemTypeDefinition = templateReader.WorkItemTypeDefinitions.First();
                field = workItemTypeDefinition.Fields.First(f => !f.ReferenceName.StartsWith("System."));
                state = workItemTypeDefinition.States.First();
            }

            _differences = new IDifference[]
                           {
                               new AddedWorkItemTypeDefinitionDifference(workItemTypeDefinition),
                               new AddedWorkItemStateDifference(workItemTypeDefinition.Name, state),
                               new AddedWorkItemFieldDifference(workItemTypeDefinition.Name, field),
                               new RenamedWorkItemTypeDefinitionDifference("User Story", "Product Backlog Item"),
                               new RenamedWorkItemFieldDifference(workItemTypeDefinition.Name, field.ReferenceName, field),
                               new RenamedWorkItemStateDifference(workItemTypeDefinition.Name, state.Value, state),
                               new ChangedWorkItemFieldDifference(workItemTypeDefinition.Name, field.ReferenceName, field),
                               new ChangedWorkItemStateDifference(workItemTypeDefinition.Name, state.Value, state),
                               new ChangedWorkItemFormDifference(workItemTypeDefinition.Name, workItemTypeDefinition.FormElement),
                               new ChangedWorkItemWorkflowDifference(workItemTypeDefinition.Name, workItemTypeDefinition.WorkflowElement),
                               new RemovedWorkItemTypeDefinitionDifference("Issue"),
                               new RemovedWorkItemFieldDifference(workItemTypeDefinition.Name, field.ReferenceName),
                               new RemovedWorkItemStateDifference(state.Value),
                               new ConsolidatedWorkItemStateDifference(workItemTypeDefinition.Name, state.Value, state)

                           };
        }
Пример #2
0
        private void SetupDifferences()
        {
            WorkItemTypeDefinition workItemTypeDefinition;
            WitdState state;
            using (var template = EmbeddedProcessTemplate.Scrum2())
            {
                var templateReader = new ProcessTemplateReader(template.TemplatePath);
                workItemTypeDefinition = templateReader.WorkItemTypeDefinitions.First();
                state = workItemTypeDefinition.States.First();
            }

            _differences = new IDifference[]
                           {
                               new RemovedWorkItemTypeDefinitionDifference("Issue"),
                               new RenamedWorkItemStateDifference(workItemTypeDefinition.Name, "not-" + state.Value, state)
                           };
        }