Пример #1
0
 def ticket_created(self, ticket):
     announcer = AnnouncementSystem(ticket.env)
     announcer.send(
         TicketChangeEvent("ticket", "created", ticket,
             author=ticket['reporter']
         )
     )
Пример #2
0
 def ticket_created(self, ticket):
     announcer = AnnouncementSystem(ticket.env)
     announcer.send(
         TicketChangeEvent("ticket",
                           "created",
                           ticket,
                           author=ticket['reporter']))
Пример #3
0
 def ticket_changed(self, ticket, comment, author, old_values):
     if old_values.keys() == ['cc'] and not comment and \
             self.ignore_cc_changes:
         return
     announcer = AnnouncementSystem(ticket.env)
     announcer.send(
         TicketChangeEvent("ticket", "changed", ticket, comment, author,
                           old_values))
Пример #4
0
 def wiki_page_changed(self, page, version, t, comment, author, ipnr):
     announcer = AnnouncementSystem(page.env)
     announcer.send(
         WikiChangeEvent("wiki", "changed", page,
             comment=comment, author=author, version=version,
             timestamp=t, remote_addr=ipnr
         )
     )
Пример #5
0
 def wiki_page_added(self, page):
     history = list(page.get_history())[0]
     announcer = AnnouncementSystem(page.env)
     announcer.send(
         WikiChangeEvent("wiki", "created", page,
             author=history[2], version=history[0]  
         )
     )        
Пример #6
0
 def ticket_changed(self, ticket, comment, author, old_values):
     if old_values.keys() == ['cc'] and not comment and \
             self.ignore_cc_changes:
         return
     announcer = AnnouncementSystem(ticket.env)
     announcer.send(
         TicketChangeEvent("ticket", "changed", ticket, 
             comment, author, old_values
         )
     )
Пример #7
0
 def attachment_added(self, attachment):
     parent = attachment.resource.parent
     if parent.realm == "ticket":
         ticket = Ticket(self.env, parent.id)
         announcer = AnnouncementSystem(ticket.env)
         announcer.send(
             TicketChangeEvent("ticket", "attachment added", ticket,
                 attachment=attachment, author=attachment.author, 
             )
         )
     elif parent.realm == "wiki":
         page = WikiPage(self.env, parent.id)
         announcer = AnnouncementSystem(page.env)
         announcer.send(
             WikiChangeEvent("wiki", "attachment added", page,
                 attachment=attachment, author=attachment.author, 
             )
         )            
Пример #8
0
 def attachment_added(self, attachment):
     parent = attachment.resource.parent
     if parent.realm == "ticket":
         ticket = Ticket(self.env, parent.id)
         announcer = AnnouncementSystem(ticket.env)
         announcer.send(
             TicketChangeEvent(
                 "ticket",
                 "attachment added",
                 ticket,
                 attachment=attachment,
                 author=attachment.author,
             ))
     elif parent.realm == "wiki":
         page = WikiPage(self.env, parent.id)
         announcer = AnnouncementSystem(page.env)
         announcer.send(
             WikiChangeEvent(
                 "wiki",
                 "attachment added",
                 page,
                 attachment=attachment,
                 author=attachment.author,
             ))
Пример #9
0
 def wiki_page_version_deleted(self, page):
     announcer = AnnouncementSystem(page.env)
     announcer.send(
         WikiChangeEvent("wiki", "version deleted", page)
     )