Ticket #7139 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Patch to trac 0.12 to fix hyperlinks to dependent tickets

Reported by: clp Assigned to: coderanger
Priority: high Component: MasterTicketsPlugin
Severity: normal Keywords:
Cc: dag.viggo@lokoen.org, darose@darose.net Trac Release: 0.12

Attachments

masterticket.patch (1.7 kB) - added by clp on 05/18/10 12:30:05.

Change History

05/18/10 12:30:05 changed by clp

  • attachment masterticket.patch added.

05/22/10 19:54:48 changed by anonymous

  • priority changed from normal to high.

06/30/10 10:11:12 changed by ronalde

  • cc set to dag.viggo@lokoen.org.
  • summary changed from Patch to trac 0.12dev to Patch to trac 0.12 to fix hyperlinks to dependent tickets.

Found a duplicate (with reaction from coderanger!) in #7257.

I transformed your patch in something you might apply to dagvl's git-version 2.1.3-viz4:

diff --git a/mastertickets/model.py b/mastertickets/model.py
index e98d114..bab21c4 100644
--- a/mastertickets/model.py
+++ b/mastertickets/model.py
@@ -5,7 +5,7 @@ from datetime import datetime
 
 from trac.ticket.model import Ticket
 from trac.util.compat import set, sorted
-from trac.util.datefmt import utc, to_timestamp
+from trac.util.datefmt import utc, to_utimestamp
 
 class TicketLinks(object):
     """A model for the ticket links used MasterTickets."""
@@ -34,7 +34,7 @@ class TicketLinks(object):
         """Save new links."""
         if when is None:
             when = datetime.now(utc)
-        when_ts = to_timestamp(when)
+        when_ts = to_utimestamp(when)
         
         handle_commit = False
         if db is None:
diff --git a/mastertickets/web_ui.py b/mastertickets/web_ui.py
index b3288cb..13cf744 100644
--- a/mastertickets/web_ui.py
+++ b/mastertickets/web_ui.py
@@ -35,7 +35,7 @@ class MasterTicketsModule(Component):
     FIELD_XPATHS = {
         'query': 'table[@class="listing tickets"]/tbody/td[@class="%s"]/text()',
         'ticket_id': 'table[@class="listing tickets"]/tbody/td[@class="id"]/a/text()',
-        'ticket': 'div[@id="ticket"]/table[@class="properties"]/td[@headers="h_%s"]/text()',
+        'ticket': '//div[@id="ticket"]/table[@class="properties"]//td[@headers="h_%s"]/text()',
     }
     fields = set(['blocking', 'blockedby'])

07/05/10 00:25:19 changed by coderanger

  • status changed from new to closed.
  • resolution set to fixed.

07/06/10 20:39:34 changed by darose

  • cc changed from dag.viggo@lokoen.org to dag.viggo@lokoen.org, darose@darose.net.

Add/Change #7139 (Patch to trac 0.12 to fix hyperlinks to dependent tickets)




Change Properties
Action