Modify

Opened 15 years ago

Closed 11 years ago

#4976 closed defect (worksforme)

Dependent tickets should link to each other

Reported by: Matt Caron Owned by: Noah Kantrowitz
Priority: normal Component: MasterTicketsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Ticket 1 blocks 2 Ticket 2 is therefore blocked by ticket 1

The ticket numbers in the "Blocked by" and "Depends on" fields should be links to the tickets which are listed in the fields.

Attachments (0)

Change History (12)

comment:1 Changed 15 years ago by Matt Caron

I should mention that this is trac 0.11.5stable and TracMasterTickets 2.1.3. Both are built from svn sources.

comment:2 Changed 15 years ago by Matt Caron

I tried this in 0.11.4 and that doesn't seem to work either.

comment:3 Changed 15 years ago by IBBoard

I'm running 0.11.4 and the links are there on the ticket page, but not in the query. I was looking at some of the spare files the other day* and there is a JavaScript file that appears as if it tries to link the ones in the table but it never gets called and I'm not sure if it would actually work.

  • there are various unused images and JS, but one JS was supposed to be used that wasn't installed on my site and was producing an Error 404

comment:4 Changed 14 years ago by Ryan J Ollos

If the property change in the ticket read Blocked by #X rather than Blocked by X, perhaps a link would automatically render?

comment:5 Changed 14 years ago by IBBoard

Possibly, but it depends how the query page is rendered. The individual ticket pages link correctly for me, but if you introduce the extra columns in to the query page then it just lists numbers without linking them. If you rendered them with a # then Trac might render them as links, but it depends whether that is wiki text functionality only that isn't called for the table fields.

comment:6 Changed 14 years ago by anonymous

Trac 0.12 seems to have different data format, that is passed to post_process_request.

I changed mastertickets/web_ui.py from

            data['mastertickets'] = {
                'field_values': {
                    'blocking': linkify_ids(self.env, req, links.blocking),
                    'blockedby': linkify_ids(self.env, req, links.blocked_by),
                },
            }

to

             for field in data['fields'][:]:
                if field['name'] == 'blocking':
                    field['rendered'] = linkify_ids(self.env, req, links.blocking)
                elif field['name'] == 'blockedby':
                    field['rendered'] = linkify_ids(self.env, req, links.blocked_by)

And now links work in ticket info

comment:7 Changed 14 years ago by anonymous

Trac Release: 0.110.12
Type: enhancementdefect

I'm using trac 0.12 and also lost the ticket link, finally I wrote a different patch with the above post, although maybe the above patch is better than this:

Index: mastertickets/web_ui.py
===================================================================
--- mastertickets/web_ui.py     (revision 7916)
+++ mastertickets/web_ui.py     (working copy)
@@ -32,7 +32,7 @@
     use_gs = BoolOption('mastertickets', 'use_gs', default=False,
                         doc='If enabled, use ghostscript to produce nicer output.')
     
-    FIELD_XPATH = 'div[@id="ticket"]/table[@class="properties"]/td[@headers="h_%s"]/text()'
+    FIELD_XPATH = './/div[@id="ticket"]/table[@class="properties"]//td[@headers="h_%s"]/text()'
     fields = set(['blocking', 'blockedby'])
     
     # IRequestFilter methods

comment:8 Changed 14 years ago by anonymous

Resolution: duplicate
Status: newclosed

duplicat of #7139, already fixed

comment:9 Changed 14 years ago by ibboard

Resolution: duplicate
Status: closedreopened

This isn't a duplicate of #7139 - this was a 0.11 issue and not a 0.12 issue.

comment:10 Changed 14 years ago by anonymous

Trac Release: 0.120.11

I have the same issue in TRAC 0.11.

The dependency graph works fine. When you update a block or blocking field it updates the corresponding ticket correctly, but the ticket numbers don't become links. Everything else seems fine.

comment:11 Changed 12 years ago by anonymous

I am using Trac 0.11.7 and am still having this issue.

comment:12 Changed 11 years ago by Ryan J Ollos

Resolution: worksforme
Status: reopenedclosed

See also #7936. I believe this has been fixed in the latest revision of the plugin. See 47a7aee54553fb718c376cfa9d7de4389a391e33. Please reopen if you continue to have issues and can provide more details about your configuration.

Modify Ticket

Change Properties
Set your email in Preferences
Action
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.