Exemple #1
0
        public void ReopenBug(string ticket, int bugid)
        {
            using (SnCore.Data.Hibernate.Session.OpenConnection())
            {
                ISession session           = SnCore.Data.Hibernate.Session.Current;
                ManagedSecurityContext sec = new ManagedSecurityContext(session, ticket);

                ManagedBug bug = new ManagedBug(session, bugid);
                bug.Reopen(sec);

                ManagedBugNote note   = new ManagedBugNote(session);
                TransitBugNote t_note = new TransitBugNote();
                t_note.BugId   = bug.Id;
                t_note.Details = "Bug reopened.";
                note.CreateOrUpdate(t_note, sec);

                SnCore.Data.Hibernate.Session.Flush();
            }
        }
Exemple #2
0
        public void ResolveBug(string ticket, int bugid, string resolution, string note)
        {
            using (SnCore.Data.Hibernate.Session.OpenConnection())
            {
                ISession session           = SnCore.Data.Hibernate.Session.Current;
                ManagedSecurityContext sec = new ManagedSecurityContext(session, ticket);

                ManagedBug bug = new ManagedBug(session, bugid);
                bug.Resolve(resolution, sec);

                if (note.Length > 0)
                {
                    TransitBugNote t_note = new TransitBugNote();
                    t_note.BugId   = bug.Id;
                    t_note.Details = note;
                    ManagedBugNote m_note = new ManagedBugNote(session);
                    m_note.CreateOrUpdate(t_note, sec);
                }

                SnCore.Data.Hibernate.Session.Flush();
            }
        }
Exemple #3
0
        public void ReopenBug(string ticket, int bugid)
        {
            using (SnCore.Data.Hibernate.Session.OpenConnection())
            {
                ISession session = SnCore.Data.Hibernate.Session.Current;
                ManagedSecurityContext sec = new ManagedSecurityContext(session, ticket);

                ManagedBug bug = new ManagedBug(session, bugid);
                bug.Reopen(sec);

                ManagedBugNote note = new ManagedBugNote(session);
                TransitBugNote t_note = new TransitBugNote();
                t_note.BugId = bug.Id;
                t_note.Details = "Bug reopened.";
                note.CreateOrUpdate(t_note, sec);

                SnCore.Data.Hibernate.Session.Flush();
            }
        }
Exemple #4
0
        public void ResolveBug(string ticket, int bugid, string resolution, string note)
        {
            using (SnCore.Data.Hibernate.Session.OpenConnection())
            {
                ISession session = SnCore.Data.Hibernate.Session.Current;
                ManagedSecurityContext sec = new ManagedSecurityContext(session, ticket);

                ManagedBug bug = new ManagedBug(session, bugid);
                bug.Resolve(resolution, sec);

                if (note.Length > 0)
                {
                    TransitBugNote t_note = new TransitBugNote();
                    t_note.BugId = bug.Id;
                    t_note.Details = note;
                    ManagedBugNote m_note = new ManagedBugNote(session);
                    m_note.CreateOrUpdate(t_note, sec);
                }

                SnCore.Data.Hibernate.Session.Flush();
            }
        }