Modify ↓
#12896 closed enhancement (fixed)
Show ticket Summary instead of ticket number
Reported by: | anonymous | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | BreadCrumbsNavPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.12 |
Description
I am looking to change the ticket number in the breadcrumbs to display the ticket summary instead. Does anyone know the easiest way to do this, please?
Attachments (0)
Change History (5)
comment:1 Changed 8 years ago by
Owner: | changed from Steffen Hoffmann to Ryan J Ollos |
---|---|
Status: | new → accepted |
comment:4 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
After updating to the latest, you can apply this patch to show the resource summary for tickets:
-
breadcrumbsnav/breadcrumbs.py
183 183 name = get_resource_shortname(self.env, resource) 184 184 title = get_resource_summary(self.env, resource) 185 185 link = req.href(realm, resource_id) 186 if realm == 'ticket': 187 name = title 186 188 187 189 first = ul == [] 188 190 li = tag.li(tag.a(title=title, href=link)(name))
An example of the resource summary for this tickets is enhancement: Show ticket Summary instead of ticket number (accepted).
To show just the ticket summary:
-
breadcrumbsnav/breadcrumbs.py
183 183 name = get_resource_shortname(self.env, resource) 184 184 title = get_resource_summary(self.env, resource) 185 185 link = req.href(realm, resource_id) 186 if realm == 'ticket': 187 from trac.ticket.model import Ticket 188 name = Ticket(self.env, resource_id)['summary'] 186 189 187 190 first = ul == [] 188 191 li = tag.li(tag.a(title=title, href=link)(name))
Note: See
TracTickets for help on using
tickets.
It looks like you could modify breadcrumbsnavplugin/trunk/breadcrumbsnav/breadcrumbs.py@10902:183#L157. I'll post a patch to point you in the right direction.