public void CreateNewALMDefects(Dictionary <Guid, Dictionary <string, string> > defectsForOpening, List <ExternalItemFieldBase> defectsFields, ALMIntegrationEnums.eALMType almType) { throw new NotImplementedException(); }
public void CreateNewALMDefects(Dictionary <Guid, Dictionary <string, string> > defectsForOpening, List <ExternalItemFieldBase> defectsFields, ALMIntegrationEnums.eALMType almType) { ALMCore aLMCore = null; eALMType defaultAlmType = WorkSpace.Instance.Solution.ALMConfigs.FirstOrDefault(typ => typ.DefaultAlm).AlmType; if (aLMCore == null || almType != defaultAlmType) { aLMCore = (ALMCore)UpdateALMType(almType); } aLMCore.ConnectALMServer(); Dictionary <Guid, string> defectsOpeningResults; if ((defectsForOpening != null) && (defectsForOpening.Count > 0)) { defectsOpeningResults = aLMCore.CreateNewALMDefects(defectsForOpening, defectsFields); } else { return; } if ((defectsOpeningResults != null) && (defectsOpeningResults.Count > 0)) { foreach (KeyValuePair <Guid, string> defectOpeningResult in defectsOpeningResults) { if ((defectOpeningResult.Value != null) && (defectOpeningResult.Value != "0")) { WorkSpace.Instance.RunsetExecutor.DefectSuggestionsList.Where(x => x.DefectSuggestionGuid == defectOpeningResult.Key).ToList().ForEach(z => { z.ALMDefectID = defectOpeningResult.Value; z.IsOpenDefectFlagEnabled = false; }); } } } //Set back Default Alm UpdateALMType(defaultAlmType); }