Search in sources :

Example 1 with DefectWorkflowPhaseUpdater

use of net.sourceforge.processdash.log.defects.DefectWorkflowPhaseUpdater in project processdash by dtuma.

the class HierarchySynchronizer method updateWorkflowPhasesInDefects.

private void updateWorkflowPhasesInDefects() {
    if (workflowXml != null) {
        DefectWorkflowPhaseUpdater u = new DefectWorkflowPhaseUpdater(new WorkflowInfo(workflowXml), !whatIfMode) {

            public void defectNeedsSave(String path, Defect d) {
                saveDefect(path, d);
            }
        };
        DefectAnalyzer.run(hierarchy, projectKey, true, u);
        // Log a "sync change" to tell the user about invalid phases.
        for (String path : u.getPathsWithNewInvalidPhases()) {
            String msg = resources.format("Bad_Defect_Phase_FMT", path);
            if (!changes.contains(msg))
                changes.add(msg);
        }
    }
}
Also used : DefectWorkflowPhaseUpdater(net.sourceforge.processdash.log.defects.DefectWorkflowPhaseUpdater) WorkflowInfo(net.sourceforge.processdash.process.WorkflowInfo) Defect(net.sourceforge.processdash.log.defects.Defect)

Aggregations

Defect (net.sourceforge.processdash.log.defects.Defect)1 DefectWorkflowPhaseUpdater (net.sourceforge.processdash.log.defects.DefectWorkflowPhaseUpdater)1 WorkflowInfo (net.sourceforge.processdash.process.WorkflowInfo)1