Beispiel #1
0
        /// <summary>
        /// Gets the defect.
        /// </summary>
        /// <param name="item">The item.</param>
        /// <returns></returns>
        public TestTrackItem GetDefect(long item)
        {
            this.RefreshConnection(false);

            if (this.connector.IsConnected)
            {
                var elem = this.connector.getDefect(item);

                TestTrackItem tt = new TestTrackItem();
                if (elem != null)
                {
                    tt.Summary = elem.summary;
                    tt.Status  = SoapToTestTrack.GetDefectStatusFromString(elem.state);
                }
                else
                {
                    tt.Summary = "Item was not properly returned from server";
                    tt.Status  = TestTrackItem.DefectStatuses.NOT_SET;
                }

                return(tt);
            }

            return(null);
        }
        /// <summary>
        ///     The get assigned items.
        /// </summary>
        /// <returns>
        ///     The <see cref="CDefect[]" />.
        /// </returns>
        public List <TestTrackItem> GetAssignedItems()
        {
            var testTrackTableColumns = new CTableColumn[14];

            testTrackTableColumns[0]       = new CTableColumn();
            testTrackTableColumns[0].name  = "Record ID";
            testTrackTableColumns[1]       = new CTableColumn();
            testTrackTableColumns[1].name  = "Number";
            testTrackTableColumns[2]       = new CTableColumn();
            testTrackTableColumns[2].name  = "Dev Priority";
            testTrackTableColumns[3]       = new CTableColumn();
            testTrackTableColumns[3].name  = "Status";
            testTrackTableColumns[4]       = new CTableColumn();
            testTrackTableColumns[4].name  = "Currently Assigned To";
            testTrackTableColumns[5]       = new CTableColumn();
            testTrackTableColumns[5].name  = "Origin";
            testTrackTableColumns[6]       = new CTableColumn();
            testTrackTableColumns[6].name  = "Dev Team";
            testTrackTableColumns[7]       = new CTableColumn();
            testTrackTableColumns[7].name  = "Date Found";
            testTrackTableColumns[8]       = new CTableColumn();
            testTrackTableColumns[8].name  = "Date Modified";
            testTrackTableColumns[9]       = new CTableColumn();
            testTrackTableColumns[9].name  = "Assign Date";
            testTrackTableColumns[10]      = new CTableColumn();
            testTrackTableColumns[10].name = "Summary";
            testTrackTableColumns[11]      = new CTableColumn();
            testTrackTableColumns[11].name = "Type";
            testTrackTableColumns[12]      = new CTableColumn();
            testTrackTableColumns[12].name = "Release blocker";
            testTrackTableColumns[13]      = new CTableColumn();
            testTrackTableColumns[13].name = "Product and Segment";
            return
                (SoapToTestTrack.RecordSoapTableToItemsList(
                     this.ttSOAP.getRecordListForTable(this.ttCookie, "Defect", "10 AssignedToMe_All", testTrackTableColumns)));
        }
Beispiel #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TestTrackItem"/> class.
        /// </summary>
        /// <param name="SoapRow">
        /// The soap row.
        /// </param>
        public TestTrackItem(CRecordRowSoap SoapRow)
        {
            if (SoapRow.row[0].value == null)
            {
                this._RecordId = 0;
            }
            else
            {
                this._RecordId = Convert.ToInt64(SoapRow.row[0].value);
            }

            if (SoapRow.row[1].value == null)
            {
                this.Number = 0;
            }
            else
            {
                this.Number = Convert.ToInt64(SoapRow.row[1].value);
            }

            this._Priority = SoapToTestTrack.GetPriorityFromString(SoapRow.row[2].value);
            this._Status   = SoapToTestTrack.GetDefectStatusFromString(SoapRow.row[3].value);

            if (SoapRow.row[5].value == null)
            {
                this._Origin = string.Empty;
            }
            else
            {
                this._Origin = SoapRow.row[5].value;
            }

            if (SoapRow.row[6].value == null)
            {
                this._Team = string.Empty;
            }
            else
            {
                this._Team = SoapRow.row[6].value;
            }

            if (SoapRow.row[7].value == null)
            {
                this._DateEntered = string.Empty;
            }
            else
            {
                this._DateEntered = SoapRow.row[7].value;
            }

            if (SoapRow.row[8].value == null)
            {
                this._DateModified = string.Empty;
            }
            else
            {
                this._DateModified = SoapRow.row[8].value;
            }

            if (SoapRow.row[9].value == null)
            {
                this._DateAssigned = string.Empty;
            }
            else
            {
                this._DateAssigned = SoapRow.row[9].value;
            }

            if (SoapRow.row[10].value == null)
            {
                this._Summary = string.Empty;
            }
            else
            {
                this._Summary = SoapRow.row[10].value;
            }

            if (SoapRow.row[11].value == null)
            {
                this._Type = string.Empty;
            }
            else
            {
                this._Type = SoapRow.row[11].value;
            }

            this._ReleaseBlocker = SoapToTestTrack.GetReleaseBlockerFromString(SoapRow.row[12].value);

            if (SoapRow.row[13].value == null)
            {
                this._Segment = string.Empty;
            }
            else
            {
                this._Segment = SoapRow.row[13].value;
            }
        }