Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#7139 closed defect (fixed)

Patch to trac 0.12 to fix hyperlinks to dependent tickets

Reported by: Carlos López Pérez Owned by: Noah Kantrowitz
Priority: high Component: MasterTicketsPlugin
Severity: normal Keywords:
Cc: Dag Viggo Lokøen, darose Trac Release: 0.12


Attachments (1)

masterticket.patch (1.7 KB) - added by Carlos López Pérez 7 years ago.

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by Carlos López Pérez

Attachment: masterticket.patch added

comment:1 Changed 7 years ago by anonymous

Priority: normalhigh

comment:2 Changed 7 years ago by ronalde

Cc: Dag Viggo Lokøen added; anonymous removed
Summary: Patch to trac 0.12devPatch 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:

  • mastertickets/

    diff --git a/mastertickets/ b/mastertickets/
    index e98d114..bab21c4 100644
    a b from datetime import datetime 
    66from trac.ticket.model import Ticket
    77from trac.util.compat import set, sorted
    8 from trac.util.datefmt import utc, to_timestamp
     8from trac.util.datefmt import utc, to_utimestamp
    1010class TicketLinks(object):
    1111    """A model for the ticket links used MasterTickets."""
    class TicketLinks(object): 
    3434        """Save new links."""
    3535        if when is None:
    3636            when =
    37         when_ts = to_timestamp(when)
     37        when_ts = to_utimestamp(when)
    3939        handle_commit = False
    4040        if db is None:
  • mastertickets/

    diff --git a/mastertickets/ b/mastertickets/
    index b3288cb..13cf744 100644
    a b class MasterTicketsModule(Component): 
    3535    FIELD_XPATHS = {
    3636        'query': 'table[@class="listing tickets"]/tbody/td[@class="%s"]/text()',
    3737        'ticket_id': 'table[@class="listing tickets"]/tbody/td[@class="id"]/a/text()',
    38         'ticket': 'div[@id="ticket"]/table[@class="properties"]/td[@headers="h_%s"]/text()',
     38        'ticket': '//div[@id="ticket"]/table[@class="properties"]//td[@headers="h_%s"]/text()',
    3939    }
    4040    fields = set(['blocking', 'blockedby'])

comment:3 Changed 7 years ago by Noah Kantrowitz

Resolution: fixed
Status: newclosed

comment:4 Changed 7 years ago by darose

Cc: darose added

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Noah Kantrowitz.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.