Changes between Initial Version and Version 3 of Ticket #5843


Ignore:
Timestamp:
Sep 20, 2009, 6:59:48 PM (15 years ago)
Author:
Steffen Pingel
Comment:

That patch did not work for me. Below is a slightly modified version that I have tested against Trac 0.11.5 but I could not figure out where the warning actually end up. On a related note, the bug currently causes ticket updates to fail in certain scenarios:

289945: Mylin Trac fails to submit a ticket with actions other than "Resolve Fixed" https://bugs.eclipse.org/bugs/show_bug.cgi?id=289945

Index: trunk/tracrpc/ticket.py
===================================================================
--- trunk/tracrpc/ticket.py     (revision 6568)
+++ trunk/tracrpc/ticket.py     (working copy)
@@ -15,6 +15,7 @@
 from trac.ticket.api import TicketSystem
 from trac.ticket.notification import TicketNotifyEmail
 from trac.ticket.web_ui import TicketModule
+from trac.web.chrome import add_warning
 from trac.util.datefmt import to_datetime, to_timestamp, utc

 import genshi
@@ -188,8 +189,7 @@
             req.args['ts'] = str(t.time_changed) # collision hack...
             changes, problems = tm.get_ticket_changes(req, t, action)
             for warning in problems:
-                req.add_warning("Rpc ticket.update: %(warning)s",
-                                    warning=warning)
+                add_warning(req, "Rpc ticket.update: %s" % (warning))
             valid = problems and False or tm._validate_ticket(req, t)
             if not valid:
                 raise TracError(

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5843

    • Property Priority changed from normal to highest