示例#1
0
 public void AddBugDefect(BugDefect bugDefect)
 {
     try
     {
         bugDefect.ticketId = BugDefectTickets.Max(m => m.ticketId) + 1;
         StreamWriter sw = new StreamWriter(filePath, true);
         sw.WriteLine($"{bugDefect.ticketId},{bugDefect.summary},{bugDefect.status},{bugDefect.priority},{bugDefect.submitter},{bugDefect.assigned},{string.Join("|", bugDefect.watching)},{bugDefect.severity}");
         sw.Close();
         BugDefectTickets.Add(bugDefect);
         logger.Info("Ticket ID {Id} added", bugDefect.ticketId);
     }
     catch (Exception ex)
     {
         logger.Error(ex.Message);
     }
 }
示例#2
0
        public BugDefectTicketFile(string BugDefectTicketFilePath)
        {
            filePath         = BugDefectTicketFilePath;
            BugDefectTickets = new List <BugDefect>();

            try
            {
                StreamReader sr = new StreamReader(filePath);
                while (!sr.EndOfStream)
                {
                    string   line          = sr.ReadLine();
                    string[] ticketDetails = line.Split(',');

                    if (ticketDetails.Length == 8)
                    {
                        BugDefect bugDefect = new BugDefect();

                        bugDefect.ticketId  = UInt64.Parse(ticketDetails[0]);
                        bugDefect.summary   = ticketDetails[1];
                        bugDefect.status    = ticketDetails[2];
                        bugDefect.priority  = ticketDetails[3];
                        bugDefect.submitter = ticketDetails[4];
                        bugDefect.assigned  = ticketDetails[5];
                        bugDefect.watching  = ticketDetails[6].Split('|').ToList();
                        bugDefect.severity  = ticketDetails[7];
                        BugDefectTickets.Add(bugDefect);
                    }
                }
                sr.Close();
                logger.Info("Tickets in file: {Count}", BugDefectTickets.Count);
            }
            catch (Exception ex)
            {
                logger.Error(ex.Message);
            }
        }
示例#3
0
        public void TicketEntry()
        {
            string        choice;
            string        type;
            List <string> baseQuestions;

            CSVTicketParser ticketParser = new CSVTicketParser();

            do
            {
                Console.WriteLine("1) Read data from file.");
                Console.WriteLine("2) Create file from data.");
                Console.WriteLine("3) Search file from data");
                Console.WriteLine("Enter any other key to exit.");
                // input response
                choice = Console.ReadLine();

                if (choice == "1")
                {
                    ReadDataFromFile();
                }
                else if (choice == "2")
                {
                    Console.WriteLine("Enter a ticket (Y/N)?");
                    response = Console.ReadLine().ToUpper();

                    if (response != "Y")
                    {
                        break;
                    }

                    Console.WriteLine("Enter a ticket type (1:Task, 2:Enhancement, 3:Bug/Defect, 4:Other Ticket)");
                    type = Console.ReadLine();

                    baseQuestions = BaseQuestions();

                    if (type == "1")
                    {
                        Task task = new Task();
                        task.ticketID  = baseQuestions[0];
                        task.summary   = baseQuestions[1];
                        task.status    = baseQuestions[2];
                        task.priority  = baseQuestions[3];
                        task.submitter = baseQuestions[4];
                        task.assigned  = baseQuestions[5];
                        task.watching  = baseQuestions[6];

                        Console.WriteLine("Enter the Project Name: ");
                        task.projectName = Console.ReadLine();

                        //05/05/2005
                        Console.WriteLine("Enter the Due Date: (ex 05/05/2005)");
                        task.dueDate = Convert.ToDateTime(Console.ReadLine());

                        StreamWriter sw = new StreamWriter(ticketFiles[1] + ".csv", append: true);

                        sw.WriteLine("{0},{1},{2},{3},{4},{5},{6},{7},{8}",
                                     task.ticketID, task.summary, task.status, task.priority, task.submitter, task.assigned, task.watching, task.projectName, task.dueDate);
                        sw.Close();
                    }
                    else if (type == "2")
                    {
                        Enhancement enhancement = new Enhancement();
                        enhancement.ticketID  = baseQuestions[0];
                        enhancement.summary   = baseQuestions[1];
                        enhancement.status    = baseQuestions[2];
                        enhancement.priority  = baseQuestions[3];
                        enhancement.submitter = baseQuestions[4];
                        enhancement.assigned  = baseQuestions[5];
                        enhancement.watching  = baseQuestions[6];

                        Console.WriteLine("Enter the Software: ");
                        enhancement.software = Console.ReadLine();

                        Console.WriteLine("Enter the Cost: ");
                        enhancement.cost = Convert.ToDouble(Console.ReadLine());

                        Console.WriteLine("Enter the Reason: ");
                        enhancement.reason = Console.ReadLine();

                        Console.WriteLine("Enter the Estimate: ");
                        enhancement.estimate = Convert.ToDouble(Console.ReadLine());

                        StreamWriter sw = new StreamWriter(ticketFiles[2] + ".csv", append: true);

                        sw.WriteLine("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10}",
                                     enhancement.ticketID, enhancement.summary, enhancement.status, enhancement.priority, enhancement.submitter, enhancement.assigned, enhancement.watching, enhancement.software, enhancement.cost, enhancement.reason, enhancement.estimate);
                        sw.Close();
                    }
                    else if (type == "3")
                    {
                        BugDefect bugDefect = new BugDefect();
                        bugDefect.ticketID  = baseQuestions[0];
                        bugDefect.summary   = baseQuestions[1];
                        bugDefect.status    = baseQuestions[2];
                        bugDefect.priority  = baseQuestions[3];
                        bugDefect.submitter = baseQuestions[4];
                        bugDefect.assigned  = baseQuestions[5];
                        bugDefect.watching  = baseQuestions[6];

                        Console.WriteLine("Enter severity (1,2,3,4)");
                        bugDefect.severity = Console.ReadLine();

                        StreamWriter sw = new StreamWriter(ticketFiles[3] + ".csv", append: true);

                        sw.WriteLine("{0},{1},{2},{3},{4},{5},{6},{7}",
                                     bugDefect.ticketID, bugDefect.summary, bugDefect.status, bugDefect.priority, bugDefect.submitter, bugDefect.assigned, bugDefect.watching, bugDefect.severity);
                        sw.Close();
                    }
                    else if (type == "4")
                    {
                        Ticket ticket = new Ticket();
                        ticket.ticketID  = baseQuestions[0];
                        ticket.summary   = baseQuestions[1];
                        ticket.status    = baseQuestions[2];
                        ticket.priority  = baseQuestions[3];
                        ticket.submitter = baseQuestions[4];
                        ticket.assigned  = baseQuestions[5];
                        ticket.watching  = baseQuestions[6];

                        StreamWriter sw = new StreamWriter(ticketFiles[4] + ".csv", append: true);

                        sw.WriteLine("{0},{1},{2},{3},{4},{5},{6}",
                                     ticket.ticketID, ticket.summary, ticket.status, ticket.priority, ticket.submitter, ticket.assigned, ticket.watching);

                        sw.Close();
                    }

                    else
                    {
                        Console.WriteLine("Please enter 1, 2, 3 or 4 to specify the ticket type");
                    }
                }
                else if (choice == "3")
                {
                    Console.WriteLine("Please choose a type of ticket to search: ");
                    Console.WriteLine("1) Bug Defects");
                    Console.WriteLine("2) Enhancements");
                    Console.WriteLine("3) Tasks");
                    Console.WriteLine("4) Other");
                    string userChoice = Console.ReadLine();

                    switch (userChoice)
                    {
                    case "1":
                    {
                        Console.WriteLine("Please choose how to search tickets:");
                        Console.WriteLine("1) Status");
                        Console.WriteLine("2) Priority");
                        Console.WriteLine("3) Submitter");
                        string response = Console.ReadLine();

                        switch (response)
                        {
                        case "1":
                        {
                            Console.WriteLine("Please choose you status: ");
                            Console.WriteLine("1) Low");
                            Console.WriteLine("2) Medium");
                            Console.WriteLine("3) High");
                            string statusRes = Console.ReadLine();

                            string fileBugDefect = "BugTickets.csv";
                            var    tickets       = ticketParser.BDStatusLow(fileBugDefect, statusRes);
                            foreach (var ticket in tickets)
                            {
                                Console.WriteLine(ticket.ticketID + " " + ticket.status);
                            }
                            break;
                        }

                        case "2":
                        {
                            Console.WriteLine("Please choose you status: ");
                            Console.WriteLine("1) Low");
                            Console.WriteLine("2) Medium");
                            Console.WriteLine("3) High");
                            string statusRes = Console.ReadLine();

                            string fileBugDefect = "BugTickets.csv";
                            var    tickets       = ticketParser.BDPriority(fileBugDefect, statusRes);
                            foreach (var ticket in tickets)
                            {
                                Console.WriteLine(ticket.ticketID + " " + ticket.status);
                            }
                            break;
                        }

                        case "3":
                        {
                            Console.WriteLine("Please choose you status: ");
                            Console.WriteLine("1) Low");
                            Console.WriteLine("2) Medium");
                            Console.WriteLine("3) High");
                            string statusRes = Console.ReadLine();

                            string fileBugDefect = "BugTickets.csv";
                            var    tickets       = ticketParser.BDSubmiter(fileBugDefect, statusRes);
                            foreach (var ticket in tickets)
                            {
                                Console.WriteLine(ticket.ticketID + " " + ticket.status);
                            }
                            break;
                        }

                        default:
                        {
                            break;
                        }
                        }
                        break;
                    }

                    case "2":
                    {
                        Console.WriteLine("Please choose how to search tickets:");
                        Console.WriteLine("1) Status");
                        Console.WriteLine("2) Priority");
                        Console.WriteLine("3) Submitter");
                        string response = Console.ReadLine();

                        switch (response)
                        {
                        case "1":
                        {
                            Console.WriteLine("Please choose you status: ");
                            Console.WriteLine("1) Low");
                            Console.WriteLine("2) Medium");
                            Console.WriteLine("3) High");
                            string statusRes = Console.ReadLine();

                            string fileEnhancement = "EnhancementTickets.csv";
                            var    tickets         = ticketParser.EHStatus(fileEnhancement, statusRes);
                            foreach (var ticket in tickets)
                            {
                                Console.WriteLine(ticket.ticketID + " " + ticket.status);
                            }
                            break;
                        }

                        case "2":
                        {
                            Console.WriteLine("Please choose you status: ");
                            Console.WriteLine("1) Low");
                            Console.WriteLine("2) Medium");
                            Console.WriteLine("3) High");
                            string statusRes = Console.ReadLine();

                            string fileEnhancement = "EnhancementTickets.csv";
                            var    tickets         = ticketParser.EHPriority(fileEnhancement, statusRes);
                            foreach (var ticket in tickets)
                            {
                                Console.WriteLine(ticket.ticketID + " " + ticket.status);
                            }
                            break;
                        }

                        case "3":
                        {
                            Console.WriteLine("Please choose you status: ");
                            Console.WriteLine("1) Low");
                            Console.WriteLine("2) Medium");
                            Console.WriteLine("3) High");
                            string statusRes = Console.ReadLine();

                            string fileEnhancement = "EnhancementTickets.csv";
                            var    tickets         = ticketParser.EHSubmitter(fileEnhancement, statusRes);
                            foreach (var ticket in tickets)
                            {
                                Console.WriteLine(ticket.ticketID + " " + ticket.status);
                            }
                            break;
                        }

                        default:
                        {
                            break;
                        }
                        }


                        break;
                    }

                    case "3":
                    {
                        Console.WriteLine("Please choose how to search tickets:");
                        Console.WriteLine("1) Status");
                        Console.WriteLine("2) Priority");
                        Console.WriteLine("3) Submitter");
                        string response = Console.ReadLine();

                        switch (response)
                        {
                        case "1":
                        {
                            Console.WriteLine("Please choose you status: ");
                            Console.WriteLine("1) Low");
                            Console.WriteLine("2) Medium");
                            Console.WriteLine("3) High");
                            string statusRes = Console.ReadLine();

                            string fileTask = "TaskTickets.csv";
                            var    tickets  = ticketParser.TaskStatus(fileTask, statusRes);
                            foreach (var ticket in tickets)
                            {
                                Console.WriteLine(ticket.ticketID + " " + ticket.status);
                            }
                            break;
                        }

                        case "2":
                        {
                            Console.WriteLine("Please choose you status: ");
                            Console.WriteLine("1) Low");
                            Console.WriteLine("2) Medium");
                            Console.WriteLine("3) High");
                            string statusRes = Console.ReadLine();

                            string fileTask = "TaskTickets.csv";
                            var    tickets  = ticketParser.TaskPriority(fileTask, statusRes);
                            foreach (var ticket in tickets)
                            {
                                Console.WriteLine(ticket.ticketID + " " + ticket.status);
                            }
                            break;
                        }

                        case "3":
                        {
                            Console.WriteLine("Please choose you status: ");
                            Console.WriteLine("1) Low");
                            Console.WriteLine("2) Medium");
                            Console.WriteLine("3) High");
                            string statusRes = Console.ReadLine();

                            string fileTask = "TaskTickets.csv";
                            var    tickets  = ticketParser.TaskSubmitter(fileTask, statusRes);
                            foreach (var ticket in tickets)
                            {
                                Console.WriteLine(ticket.ticketID + " " + ticket.status);
                            }
                            break;
                        }

                        default:
                        {
                            break;
                        }
                        }


                        break;
                    }

                    case "4":
                    {
                        Console.WriteLine("Please choose how to search tickets:");
                        Console.WriteLine("1) Status");
                        Console.WriteLine("2) Priority");
                        Console.WriteLine("3) Submitter");
                        string response = Console.ReadLine();

                        switch (response)
                        {
                        case "1":
                        {
                            Console.WriteLine("Please choose you status: ");
                            Console.WriteLine("1) Low");
                            Console.WriteLine("2) Medium");
                            Console.WriteLine("3) High");
                            string statusRes = Console.ReadLine();

                            var tickets = ticketParser.TicketStatus(file, statusRes);
                            foreach (var ticket in tickets)
                            {
                                Console.WriteLine(ticket.ticketID + " " + ticket.status);
                            }
                            break;
                        }

                        case "2":
                        {
                            Console.WriteLine("Please choose you status: ");
                            Console.WriteLine("1) Low");
                            Console.WriteLine("2) Medium");
                            Console.WriteLine("3) High");
                            string statusRes = Console.ReadLine();

                            var tickets = ticketParser.TicketPriority(file, statusRes);
                            foreach (var ticket in tickets)
                            {
                                Console.WriteLine(ticket.ticketID + " " + ticket.status);
                            }
                            break;
                        }

                        case "3":
                        {
                            Console.WriteLine("Please type in name of submitter: ");
                            string statusRes = Console.ReadLine();

                            var tickets = ticketParser.TicketSubmitter(file, statusRes);
                            foreach (var ticket in tickets)
                            {
                                Console.WriteLine(ticket.ticketID + " " + ticket.status);
                            }
                            break;
                        }

                        default:
                        {
                            break;
                        }
                        }


                        break;
                    }
                    }
                }
            } while (choice == "1" || choice == "2" || choice == "3"); // do while loop for option two, continue adding records
        }
示例#4
0
        static void Main(string[] args)
        {
            string bugDefectTicketFilePath   = Directory.GetCurrentDirectory() + "\\tickets.csv";
            string enhancementTicketFilePath = Directory.GetCurrentDirectory() + "\\enhancements.csv";
            string taskTicketFilePath        = Directory.GetCurrentDirectory() + "\\tasks.csv";

            logger.Info("Program started");

            BugDefectTicketFile   bugDefectTicketFile   = new BugDefectTicketFile(bugDefectTicketFilePath);
            EnhancementTicketFile enhancementTicketFile = new EnhancementTicketFile(enhancementTicketFilePath);
            TaskTicketFile        taskTicketFile        = new TaskTicketFile(taskTicketFilePath);


            string choice = "";

            do
            {
                Console.WriteLine("1) Add Ticket");
                Console.WriteLine("2) Display All Tickets");
                Console.WriteLine("Enter to quit");

                choice = Console.ReadLine();
                logger.Info("User choice: {Choice}", choice);

                if (choice == "1")
                {
                    Console.WriteLine("1) Bug/Defect");
                    Console.WriteLine("2) Enhancement");
                    Console.WriteLine("3) Task");
                    string ticketTypeChoice = Console.ReadLine();
                    logger.Info("User choice: {Choice}", ticketTypeChoice);

                    if (ticketTypeChoice == "1")
                    {
                        BugDefect bugDefect = new BugDefect();

                        Console.WriteLine("Enter Bug/Defect ticket summary");
                        bugDefect.summary = Console.ReadLine();

                        Console.WriteLine("Enter Bug/Defect ticket status");
                        bugDefect.status = Console.ReadLine();

                        Console.WriteLine("Enter Bug/Defect ticket priority");
                        bugDefect.priority = Console.ReadLine();

                        Console.WriteLine("Enter Bug/Defect ticket submitter");
                        bugDefect.submitter = Console.ReadLine();

                        Console.WriteLine("Enter Bug/Defect ticket asignee");
                        bugDefect.assigned = Console.ReadLine();

                        string input;
                        do
                        {
                            Console.WriteLine("Enter Bug/Defect ticket watcher (or done to quit)");
                            input = Console.ReadLine();
                            if (input != "done" && input.Length > 0)
                            {
                                bugDefect.watching.Add(input);
                            }
                        }while (input != "done");

                        if (bugDefect.watching.Count == 0)
                        {
                            bugDefect.watching.Add("(no watchers listed)");
                        }

                        Console.WriteLine("Enter Bug/Defect ticket severity");
                        bugDefect.severity = Console.ReadLine();

                        bugDefectTicketFile.AddBugDefect(bugDefect);
                    }

                    if (ticketTypeChoice == "2")
                    {
                        Enhancement enhancement = new Enhancement();

                        Console.WriteLine("Enter Enhancement ticket summary");
                        enhancement.summary = Console.ReadLine();

                        Console.WriteLine("Enter Enhancement ticket status");
                        enhancement.status = Console.ReadLine();

                        Console.WriteLine("Enter Enhancement ticket priority");
                        enhancement.priority = Console.ReadLine();

                        Console.WriteLine("Enter Enhancement ticket submitter");
                        enhancement.submitter = Console.ReadLine();

                        Console.WriteLine("Enter Enhancement ticket asignee");
                        enhancement.assigned = Console.ReadLine();

                        string input;
                        do
                        {
                            Console.WriteLine("Enter Enhancement ticket watcher (or done to quit)");
                            input = Console.ReadLine();
                            if (input != "done" && input.Length > 0)
                            {
                                enhancement.watching.Add(input);
                            }
                        }while (input != "done");

                        if (enhancement.watching.Count == 0)
                        {
                            enhancement.watching.Add("(no watchers listed)");
                        }

                        Console.WriteLine("Enter Enhancement ticket software");
                        enhancement.software = Console.ReadLine();

                        Console.WriteLine("Enter Enhancement ticket cost");
                        enhancement.cost = Console.ReadLine();

                        Console.WriteLine("Enter Enhancement ticket reason");
                        enhancement.reason = Console.ReadLine();

                        Console.WriteLine("Enter Enhancement ticket estimate");
                        enhancement.estimate = Console.ReadLine();

                        enhancementTicketFile.AddEnhancemant(enhancement);
                    }
                    if (ticketTypeChoice == "3")
                    {
                        Task task = new Task();

                        Console.WriteLine("Enter Task ticket summary");
                        task.summary = Console.ReadLine();

                        Console.WriteLine("Enter Task ticket status");
                        task.status = Console.ReadLine();

                        Console.WriteLine("Enter Task ticket priority");
                        task.priority = Console.ReadLine();

                        Console.WriteLine("Enter Task ticket submitter");
                        task.submitter = Console.ReadLine();

                        Console.WriteLine("Enter Task ticket asignee");
                        task.assigned = Console.ReadLine();

                        string input;
                        do
                        {
                            Console.WriteLine("Enter Task ticket watcher (or done to quit)");
                            input = Console.ReadLine();
                            if (input != "done" && input.Length > 0)
                            {
                                task.watching.Add(input);
                            }
                        }while (input != "done");

                        if (task.watching.Count == 0)
                        {
                            task.watching.Add("(no watchers listed)");
                        }

                        Console.WriteLine("Enter Task ticket project name");
                        task.projectName = Console.ReadLine();

                        Console.WriteLine("Enter Task ticket due date");
                        task.dueDate = Console.ReadLine();

                        taskTicketFile.AddTask(task);
                    }
                }

                else if (choice == "2")
                {
                    Console.WriteLine("1) Bug/Defect");
                    Console.WriteLine("2) Enhancement");
                    Console.WriteLine("3) Task");
                    string ticketTypeChoice = Console.ReadLine();
                    logger.Info("User choice: {Choice}", ticketTypeChoice);

                    if (ticketTypeChoice == "1")
                    {
                        foreach (Ticket m in bugDefectTicketFile.BugDefectTickets)
                        {
                            Console.WriteLine(m.Display());
                        }
                    }
                    else if (ticketTypeChoice == "2")
                    {
                        foreach (Ticket m in enhancementTicketFile.EnhancementTickets)
                        {
                            Console.WriteLine(m.Display());
                        }
                    }
                    else if (ticketTypeChoice == "3")
                    {
                        foreach (Ticket m in taskTicketFile.TaskTickets)
                        {
                            Console.WriteLine(m.Display());
                        }
                    }
                }
            } while (choice == "1" || choice == "2");
            logger.Info("Program ended");
        }
示例#5
0
        static void Main(string[] args)
        {
            string bugDefectTicketFilePath   = Directory.GetCurrentDirectory() + "\\tickets.csv";
            string enhancementTicketFilePath = Directory.GetCurrentDirectory() + "\\enhancements.csv";
            string taskTicketFilePath        = Directory.GetCurrentDirectory() + "\\tasks.csv";

            logger.Info("Program started");

            BugDefectTicketFile   bugDefectTicketFile   = new BugDefectTicketFile(bugDefectTicketFilePath);
            EnhancementTicketFile enhancementTicketFile = new EnhancementTicketFile(enhancementTicketFilePath);
            TaskTicketFile        taskTicketFile        = new TaskTicketFile(taskTicketFilePath);


            string choice = "";

            do
            {
                Console.WriteLine("1) Add Ticket");
                Console.WriteLine("2) Display All Tickets");
                Console.WriteLine("3) Search Tickets");
                Console.WriteLine("Enter to quit");

                choice = Console.ReadLine();
                logger.Info("User choice: {Choice}", choice);

                if (choice == "1")
                {
                    Console.WriteLine("1) Bug/Defect");
                    Console.WriteLine("2) Enhancement");
                    Console.WriteLine("3) Task");
                    string ticketTypeChoice = Console.ReadLine();
                    logger.Info("User choice: {Choice}", ticketTypeChoice);

                    if (ticketTypeChoice == "1")
                    {
                        BugDefect bugDefect = new BugDefect();

                        Console.WriteLine("Enter Bug/Defect ticket summary");
                        bugDefect.summary = Console.ReadLine();

                        Console.WriteLine("Enter Bug/Defect ticket status");
                        bugDefect.status = Console.ReadLine();

                        Console.WriteLine("Enter Bug/Defect ticket priority");
                        bugDefect.priority = Console.ReadLine();

                        Console.WriteLine("Enter Bug/Defect ticket submitter");
                        bugDefect.submitter = Console.ReadLine();

                        Console.WriteLine("Enter Bug/Defect ticket asignee");
                        bugDefect.assigned = Console.ReadLine();

                        string input;
                        do
                        {
                            Console.WriteLine("Enter Bug/Defect ticket watcher (or done to quit)");
                            input = Console.ReadLine();
                            if (input != "done" && input.Length > 0)
                            {
                                bugDefect.watching.Add(input);
                            }
                        }while (input != "done");

                        if (bugDefect.watching.Count == 0)
                        {
                            bugDefect.watching.Add("(no watchers listed)");
                        }

                        Console.WriteLine("Enter Bug/Defect ticket severity");
                        bugDefect.severity = Console.ReadLine();

                        bugDefectTicketFile.AddBugDefect(bugDefect);
                    }

                    if (ticketTypeChoice == "2")
                    {
                        Enhancement enhancement = new Enhancement();

                        Console.WriteLine("Enter Enhancement ticket summary");
                        enhancement.summary = Console.ReadLine();

                        Console.WriteLine("Enter Enhancement ticket status");
                        enhancement.status = Console.ReadLine();

                        Console.WriteLine("Enter Enhancement ticket priority");
                        enhancement.priority = Console.ReadLine();

                        Console.WriteLine("Enter Enhancement ticket submitter");
                        enhancement.submitter = Console.ReadLine();

                        Console.WriteLine("Enter Enhancement ticket asignee");
                        enhancement.assigned = Console.ReadLine();

                        string input;
                        do
                        {
                            Console.WriteLine("Enter Enhancement ticket watcher (or done to quit)");
                            input = Console.ReadLine();
                            if (input != "done" && input.Length > 0)
                            {
                                enhancement.watching.Add(input);
                            }
                        }while (input != "done");

                        if (enhancement.watching.Count == 0)
                        {
                            enhancement.watching.Add("(no watchers listed)");
                        }

                        Console.WriteLine("Enter Enhancement ticket software");
                        enhancement.software = Console.ReadLine();

                        Console.WriteLine("Enter Enhancement ticket cost");
                        enhancement.cost = Console.ReadLine();

                        Console.WriteLine("Enter Enhancement ticket reason");
                        enhancement.reason = Console.ReadLine();

                        Console.WriteLine("Enter Enhancement ticket estimate");
                        enhancement.estimate = Console.ReadLine();

                        enhancementTicketFile.AddEnhancemant(enhancement);
                    }
                    if (ticketTypeChoice == "3")
                    {
                        Task task = new Task();

                        Console.WriteLine("Enter Task ticket summary");
                        task.summary = Console.ReadLine();

                        Console.WriteLine("Enter Task ticket status");
                        task.status = Console.ReadLine();

                        Console.WriteLine("Enter Task ticket priority");
                        task.priority = Console.ReadLine();

                        Console.WriteLine("Enter Task ticket submitter");
                        task.submitter = Console.ReadLine();

                        Console.WriteLine("Enter Task ticket asignee");
                        task.assigned = Console.ReadLine();

                        string input;
                        do
                        {
                            Console.WriteLine("Enter Task ticket watcher (or done to quit)");
                            input = Console.ReadLine();
                            if (input != "done" && input.Length > 0)
                            {
                                task.watching.Add(input);
                            }
                        }while (input != "done");

                        if (task.watching.Count == 0)
                        {
                            task.watching.Add("(no watchers listed)");
                        }

                        Console.WriteLine("Enter Task ticket project name");
                        task.projectName = Console.ReadLine();

                        Console.WriteLine("Enter Task ticket due date");
                        task.dueDate = Console.ReadLine();

                        taskTicketFile.AddTask(task);
                    }
                }

                else if (choice == "2")
                {
                    Console.WriteLine("1) Bug/Defect");
                    Console.WriteLine("2) Enhancement");
                    Console.WriteLine("3) Task");
                    string ticketTypeChoice = Console.ReadLine();
                    logger.Info("User choice: {Choice}", ticketTypeChoice);

                    if (ticketTypeChoice == "1")
                    {
                        foreach (Ticket m in bugDefectTicketFile.BugDefectTickets)
                        {
                            Console.WriteLine(m.Display());
                        }
                    }
                    else if (ticketTypeChoice == "2")
                    {
                        foreach (Ticket m in enhancementTicketFile.EnhancementTickets)
                        {
                            Console.WriteLine(m.Display());
                        }
                    }
                    else if (ticketTypeChoice == "3")
                    {
                        foreach (Ticket m in taskTicketFile.TaskTickets)
                        {
                            Console.WriteLine(m.Display());
                        }
                    }
                }
                else if (choice == "3")
                {
                    Console.WriteLine("1) Search Status");
                    Console.WriteLine("2) Search Priority");
                    Console.WriteLine("3) Search Submitter");
                    string searchChoice = Console.ReadLine();

                    if (searchChoice == "1")
                    {
                        Console.WriteLine("Enter Ticket Status");
                        string statusInput = Console.ReadLine();

                        var statusBugDefectSearch   = bugDefectTicketFile.BugDefectTickets.Where(m => m.status.ToLower().Contains($"{statusInput}"));
                        var statusEnhancementSearch = enhancementTicketFile.EnhancementTickets.Where(m => m.status.ToLower().Contains($"{statusInput}"));
                        var statusTaskSearch        = taskTicketFile.TaskTickets.Where(m => m.status.ToLower().Contains($"{statusInput}"));

                        Console.WriteLine($"There are {statusBugDefectSearch.Count()+statusTaskSearch.Count()+statusEnhancementSearch.Count()} {statusInput} status tickets:\n");

                        Console.WriteLine("Bug Defect Tickets:");
                        foreach (BugDefect m in statusBugDefectSearch)
                        {
                            Console.WriteLine($" {m.Display()}");
                        }

                        Console.WriteLine("Enhancement Tickets:");
                        foreach (Enhancement m in statusEnhancementSearch)
                        {
                            Console.WriteLine($" {m.Display()}");
                        }

                        Console.WriteLine("Task Tickets:");
                        foreach (Task m in statusTaskSearch)
                        {
                            Console.WriteLine($" {m.Display()}");
                        }
                    }
                    else if (searchChoice == "2")
                    {
                        Console.WriteLine("Enter Ticket Priority");
                        string priorityInput = Console.ReadLine();

                        var priorityBugDefectSearch   = bugDefectTicketFile.BugDefectTickets.Where(m => m.priority.ToLower().Contains($"{priorityInput}"));
                        var priorityEnhancementSearch = enhancementTicketFile.EnhancementTickets.Where(m => m.priority.ToLower().Contains($"{priorityInput}"));
                        var priorityTaskSearch        = taskTicketFile.TaskTickets.Where(m => m.priority.ToLower().Contains($"{priorityInput}"));

                        Console.WriteLine($"There are {priorityBugDefectSearch.Count()+priorityEnhancementSearch.Count()+priorityTaskSearch.Count()} {priorityInput} tickets:\n");

                        Console.WriteLine("Bug Defect Tickets:");
                        foreach (BugDefect m in priorityBugDefectSearch)
                        {
                            Console.WriteLine($" {m.Display()}");
                        }

                        Console.WriteLine("Enhancement Tickets:");
                        foreach (Enhancement m in priorityEnhancementSearch)
                        {
                            Console.WriteLine($" {m.Display()}");
                        }
                        Console.WriteLine("Task Tickets:");
                        foreach (Task m in priorityTaskSearch)
                        {
                            Console.WriteLine($" {m.Display()}");
                        }
                    }
                    else if (searchChoice == "3")
                    {
                        Console.WriteLine("Enter Ticket Submitter");
                        string submitterInput = Console.ReadLine();

                        var submitterBugDefectSearch   = bugDefectTicketFile.BugDefectTickets.Where(m => m.submitter.ToLower().Contains($"{submitterInput}"));
                        var submitterEnhancementSearch = enhancementTicketFile.EnhancementTickets.Where(m => m.submitter.ToLower().Contains($"{submitterInput}"));
                        var submitterTaskSearch        = taskTicketFile.TaskTickets.Where(m => m.submitter.ToLower().Contains($"{submitterInput}"));

                        Console.WriteLine($"There are {submitterBugDefectSearch.Count()+submitterEnhancementSearch.Count()+submitterTaskSearch.Count()} tickets submitted by {submitterInput}:\n");

                        Console.WriteLine("Bug Defect Tickets:");
                        foreach (BugDefect m in submitterBugDefectSearch)
                        {
                            Console.WriteLine($" {m.Display()}");
                        }

                        Console.WriteLine("Enhancement Tickets:");
                        foreach (Enhancement m in submitterEnhancementSearch)
                        {
                            Console.WriteLine($" {m.Display()}");
                        }
                        Console.WriteLine("Task Tickets:");
                        foreach (Task m in submitterTaskSearch)
                        {
                            Console.WriteLine($" {m.Display()}");
                        }
                    }
                }
            } while (choice == "1" || choice == "2" || choice == "3");
            logger.Info("Program ended");
        }