Modify

Opened 6 years ago

Closed 4 years ago

#3475 closed defect (worksforme)

[PATCH] ListTagged display options

Reported by: seade@… Owned by: athomas
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@… 5 years ago.
patch - apply to macros.py

Download all attachments as: .zip

Change History (8)

comment:1 Changed 5 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 5 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 5 years ago by thomas.constans@…

patch - apply to macros.py

comment:3 follow-up: Changed 5 years ago by seade@…

Is it just me or is the patch file empty?

comment:4 in reply to: ↑ 3 Changed 5 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 5 years ago by anonymous

  • Summary changed from ListTagged display options to [PATCH] ListTagged display options

comment:6 Changed 4 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 4 years ago by hasienda

  • Keywords macro ListTagged added
  • Resolution set to worksforme
  • Status changed from new to closed

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.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.