C# Windows Form Application Bug Tracking System Create a windows application to
ID: 3779938 • Letter: C
Question
C#
Windows Form Application
Bug Tracking System
Create a windows application to track bugs. The screen should display the list of current bugs as well as a form to add a new bug. A bug is defined by the fields below. I will provide a JSON data file with a couple of bugs already added for a starting point. Make sure to error check all data entry. Use appropriate controls for the different fields.
BONUS POINTS: Display the details of a single Bug Report entry in a NEW
window.
Bug Report
Who found it
When it was found
Where it was found (Which Screen/Part of the system)
Steps to reproduce the bug
Severity (1-5) 1 is Low
Who it was assigned to
State (New, Resolved, Closed, False Alarm)
Resolution (How it was fixed)
JSON data file
[
{
"Id": 1,
"FoundBy": "Bob Carlson",
"DateFound": "2016-02-13T00:00:00",
"FoundIn": "Create User Module",
"ReproSteps": "Click 'New User', then enter name and click 'Add' button. Throws error.",
"Severity": 4,
"AssignedTo": "",
"State": "New",
"Resolution": ""
},
{
"Id": 2,
"FoundBy": "Sue Parcell",
"DateFound": "2016-03-23T00:00:00",
"FoundIn": "Login",
"ReproSteps": "When I try to login, I get invalid password message.",
"Severity": 1,
"AssignedTo": "Jose Guzman",
"State": "False Alarm",
"Resolution": "PEBKAC - User was typing wrong password."
},
{
"Id": 3,
"FoundBy": "Courtney Miller",
"DateFound": "2016-08-09T00:00:00",
"FoundIn": "Reports",
"ReproSteps": "Weekly reports is summing the distribution totals incorrectly.",
"Severity": 4,
"AssignedTo": "John Smith",
"State": "Closed",
"Resolution": "Report was summing the wrong field."
},
{
"Id": 4,
"FoundBy": "Bob Carlson",
"DateFound": "2016-08-09T00:00:00",
"FoundIn": "Edit Inventory",
"ReproSteps": "After changing an item and clicking 'Save', the data is not updated.",
"Severity": 5,
"AssignedTo": "John Smith",
"State": "Resolved",
"Resolution": "Data was saved, but not updated on the next screen. Needs testing."
}
]
Explanation / Answer
public class Bug
{
public int ID { get; set; }
public string FoundBy { get; set; }
public string DateFound { get; set; }
public String FoundIn { get; set; }
public string ReproSteps{ get; set; }
public string Severity{ get; set; }
public String AssignedTo { get; set; }
public string State{ get; set; }
public string Resolution { get; set; }
}
var Records = JsonConvert.DeserializeObject<List<Bug>>(details);
JsonObject jObject = new JsonObject(list);
var stream = new StreamWriter("json out file.json");
foreach (var x in jObject)
{
// textBox1.AppendText(x.Key + " : " + x.Value + " ");
textBox1.AppendText(x.ToString() + " ");
stream.WriteLine(x.ToString() + " ");
}
JsonArray jarray = new JsonArray("ID","FoundBy","DateFound");
foreach (var x in jarray)
{
textBox1.AppendText(x.ToString());
stream.WriteLine(x.ToString());
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.