Example #1
0
        public override TCObject Execute(TCObject objectToExecuteOn, TCAddOnTaskContext taskContext)
        {
            if (objectToExecuteOn is TCFolder)
            {
                AddExecutionEntries(objectToExecuteOn as TCFolder);
            }

            if (objectToExecuteOn is ExecutionEntryFolder)
            {
                AddExecutionEntries(objectToExecuteOn as ExecutionEntryFolder);
            }

            if (objectToExecuteOn is ExecutionList)
            {
                AddExecutionEntries(objectToExecuteOn as ExecutionList);
            }
            TFSConnector tfs = new TFSConnector();
            foreach (ExecutionEntry ee in entries)
            {
                if (IsInteger(ee.ActualLog.ChangeRequestId))
                {
                    DefectResult dr = tfs.GetDefect(ee.ActualLog.ChangeRequestId);
                    ee.ActualLog.ChangeRequestState = dr.status;
                }
            }
            tfs.GetTFSDefectsWithToscaDefects();
            tfs.DisposeTFS();
            return null;
        }
Example #2
0
 public override TCObject Execute(TCObject objectToExecuteOn, TCAddOnTaskContext taskContext)
 {
     ExecutionEntry ee = objectToExecuteOn as ExecutionEntry;
     TFSConnector tfs = new TFSConnector();
     DefectResult dr = tfs.GetDefect(ee.ActualLog.ChangeRequestId);
     tfs.DisposeTFS();
     if (!String.IsNullOrEmpty(dr.status))
     {
         ee.ActualLog.Comment = dr.status;
     }
     return null;
 }
Example #3
0
        public override TCObject Execute(TCObject objectToExecuteOn, TCAddOnTaskContext taskContext)
        {
            if (objectToExecuteOn is TCFolder)
            {
                AddExecutionEntries(objectToExecuteOn as TCFolder);
            }

            if (objectToExecuteOn is ExecutionEntryFolder)
            {
                AddExecutionEntries(objectToExecuteOn as ExecutionEntryFolder);
            }

            if (objectToExecuteOn is ExecutionList)
            {
                AddExecutionEntries(objectToExecuteOn as ExecutionList);
            }
            TFSConnector tfs = new TFSConnector();
            List<Defect> TFSDefects = tfs.GetTFSDefectsWithToscaDefects();
            foreach (ExecutionEntry ee in entries)
            {
                if (IsInteger(ee.ActualLog.ChangeRequestId))
                {
                    DefectResult dr = tfs.GetDefect(ee.ActualLog.ChangeRequestId);
                    ee.ActualLog.ChangeRequestState = dr.status;
                }
                else
                {
                    Defect defect = TFSDefects.Find(d => d.uniqueid == ee.UniqueId);
                    if (defect != null)
                    {
                        ee.ActualLog.ChangeRequestState = defect.status;
                        ee.ActualLog.ChangeRequestId = defect.id.ToString();
                    }
                }
            }

            tfs.DisposeTFS();
            return null;
        }