Ejemplo n.º 1
0
        private static void ParseTracTicket(TracTicket targetTicket, object[] ticketData)
        {
            int          ticketID   = (int)ticketData[0];
            DateTime     created    = (DateTime)ticketData[1];
            DateTime     updated    = (DateTime)ticketData[2];
            XmlRpcStruct attributes = (XmlRpcStruct)ticketData[3];

            targetTicket.BusinessValue         = attributes.GetValue <decimal?>("businessvalue");
            targetTicket.Changed               = updated;
            targetTicket.ChangeTime            = attributes.GetValue <DateTime>("changetime").ToLocalTime();
            targetTicket.Component             = attributes.GetValue <string>("component");
            targetTicket.ConfigurationSettings = attributes.GetValue <string>("configsettings");
            targetTicket.Created               = created;
            targetTicket.Description           = attributes.GetValue <string>("description");
            targetTicket.FeatureBranch         = attributes.GetValue <string>("feature_branch");
            targetTicket.HowToQA               = attributes.GetValue <string>("howtoqa");
            targetTicket.InstallationNotes     = attributes.GetValue <string>("setupnotes");
            targetTicket.Milestone             = attributes.GetValue <string>("milestone");
            targetTicket.Owner            = attributes.GetValue <string>("owner");
            targetTicket.ParentTicketID   = attributes.GetValue <int?>("parents");
            targetTicket.Priority         = TracTypeConverters.TicketPriorityConverter.ConvertToTarget(attributes.GetValue <string>("priority"));
            targetTicket.QaBY             = attributes.GetValue <string>("qaby");
            targetTicket.Remaining        = attributes.GetValue <decimal>("estimatedhours");
            targetTicket.Reporter         = attributes.GetValue <string>("reporter");
            targetTicket.SprintAssignment = attributes.GetValue <string>("sprintassignment");
            targetTicket.SprintTeam       = attributes.GetValue <string>("sprintteam");
            targetTicket.Status           = TracTypeConverters.TicketStatusConverter.ConvertToTarget(attributes.GetValue <string>("status"));
            targetTicket.StatusUpdates    = TracTypeConverters.TicketStatusUpdatesConverter.ConvertToTarget(attributes.GetValue <string>("statusupdatetext"));
            targetTicket.Summary          = attributes.GetValue <string>("summary");
            targetTicket.TargetVersion    = attributes.GetValue <string>("targetversion");
            targetTicket.TechnicalNotes   = attributes.GetValue <string>("technotes");
            targetTicket.TestPlanReviewed = TracTypeConverters.BooleanTracConverter.ConvertToTarget(attributes.GetValue <string>("testplanreviewedprog"));
            targetTicket.TotalHours       = attributes.GetValue <decimal>("totalhours");
        }