private void AssignUser(BugzillaAssigneeAction assigneeAction)
        {
            var queryString = HttpUtility.ParseQueryString(assigneeAction.Value());

            var bug = Bugs.GetById(int.Parse(queryString["bugid"]));

            bug.assigned_to = queryString["user"];
        }
        private void SendComment(BugzillaCommentAction bugzillaCommentAction)
        {
            var queryString = HttpUtility.ParseQueryString(bugzillaCommentAction.Value());

            var bug = Bugs.GetById(int.Parse(queryString["bugid"]));

            if (bug.long_descCollection == null || bug.long_descCollection.Count < 1)
            {
                bug.long_descCollection = new long_descCollection {
                    new long_desc {
                        thetext = "description"
                    }
                };
            }

            bug.long_descCollection.Add(new long_desc
            {
                thetext  = Encoding.ASCII.GetString(Convert.FromBase64String(queryString["comment_text"])),
                who      = queryString["owner"],
                bug_when = queryString["date"]
            });
        }
        private void ChangeState(BugzillaChangeStatusAction action)
        {
            var queryString = HttpUtility.ParseQueryString(action.Value());

            var bug = Bugs.GetById(int.Parse(queryString["id"]));

            bug.bug_status = queryString["status"];
            if (!string.IsNullOrEmpty(queryString["resolution"]))
            {
                bug.resolution = queryString["resolution"];
            }

            if (!string.IsNullOrEmpty(queryString["dup_id"]))
            {
                bug.dup_id = queryString["dup_id"];
            }

            if (!BugUpdateCalls.ContainsKey(bug.bug_id))
            {
                BugUpdateCalls.Add(bug.bug_id, 0);
            }
            BugUpdateCalls[bug.bug_id]++;
        }