Modify

Opened 16 years ago

Closed 14 years ago

#3475 closed defect (worksforme)

[PATCH] ListTagged display options

Reported by: seade@… Owned by: Alec Thomas
Priority: normal Component: TagsPlugin
Severity: normal Keywords: macro ListTagged
Cc: Trac Release: 0.11

Description

I seem to recall that the ListTagged macro used to display the ticket summary when listing ticket results (this would be with Trac 0.10). This was really helpful and is sorely missed now that we have upgraded.

I have raised this ticket as a defect because this represents a regression in functionality.

Attachments (1)

patch (811 bytes) - added by thomas.constans@… 16 years ago.
patch - apply to macros.py

Download all attachments as: .zip

Change History (8)

comment:1 Changed 16 years ago by thomas.constans@…

Don't know if it was there, but i confirm that getting ticket summary, along with it's number would be really really nice

Regards

comment:2 Changed 16 years ago by thomas.constans@…

Here's a patch

I bet it's ugly, but it work for me (tm), and i am no python guru.

Regards

Changed 16 years ago by thomas.constans@…

Attachment: patch added

patch - apply to macros.py

comment:3 Changed 16 years ago by seade@…

Is it just me or is the patch file empty?

comment:4 in reply to:  3 Changed 16 years ago by thomas.constans@…

Replying to seade@backstagetech.com.au:

Is it just me or is the patch file empty?

Attachment apparently didnot work.

BTW i was talking about macros.py in tagsplugins source directory, not trac

13a14
> from trac.ticket.model import Ticket
71a73
> 	summary=None
80a83
> 	    
81a85,88
> 	    if resource.realm=='ticket':
> 	       t=Ticket(self.env, resource.id)
> 	       summary=t['summary']
> 
87,89c94,102
<                 li = builder.li(link(resource), ' (', rendered_tags[0],
<                                 [(' ', tag) for tag in rendered_tags[1:]],
<                                 ')')
---
> 		if summary:
> 		   li = builder.li(link(resource), ' ', summary, ' (',
> 				   [(' ', tag) for tag in rendered_tags[1:]],
> 				   ')')
> 		else:
> 		   li = builder.li(link(resource), ' (', rendered_tags[0],
> 				   [(' ', tag) for tag in rendered_tags[1:]],
> 				   ')')
> 

comment:5 Changed 15 years ago by anonymous

Summary: ListTagged display options[PATCH] ListTagged display options

comment:6 Changed 14 years ago by olivier

There's a simpler way actually:

diff -aur tagsplugin/tractags/macros.py tagsplugin2/tractags/macros.py
--- tagsplugin/tractags/macros.py       2010-01-13 05:32:48.000000000 +0100
+++ tagsplugin2/tractags/macros.py      2010-09-23 17:14:06.000000000 +0200
@@ -73,7 +73,7 @@

         def link(resource):
             return render_resource_link(self.env, formatter.context,
-                                        resource, 'compact')
+                                        resource, 'summary')

         ul = builder.ul(class_='taglist')
         for resource, tags in sorted(query_result,
}}

comment:7 Changed 14 years ago by Steffen Hoffmann

Keywords: macro ListTagged added
Resolution: worksforme
Status: newclosed

Ticket summary is printed now just behind ticket number even without the patch suggested here. So this has been fixed at least in trunk, maybe when adding the more general describe_tagged_resource method, that tries to get a wiki page headline as well.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Alec Thomas.
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.