#2859 closed enhancement (fixed)
Search results should emphasis closed tickets from other tickets
| Reported by: | Emmanuel Blot | Owned by: | Jonas Borgström | 
|---|---|---|---|
| Priority: | low | Milestone: | 0.10 | 
| Component: | search system | Version: | devel | 
| Severity: | trivial | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description
It would be nice if the search results reported the status of each ticket (closed or not) using the usual strike style.
Attachments (0)
Change History (8)
comment:1 by , 20 years ago
| Milestone: | → 0.10 | 
|---|---|
| Resolution: | → fixed | 
| Status: | new → closed | 
comment:2 by , 20 years ago
Another place where chris' html.py++ would be handy :)
- 
      
api.py
197 197 for summary,desc,author,keywords,tid,date,status in cursor: 198 198 ticket = '#%d: ' % tid 199 199 if status == 'closed': 200 ticket = util. Markup('<span style="text-decoration: '201 'line-through">#%s</span>: ', tid)200 ticket = util.html.SPAN(style="text-decoration: line-through", 201 title="closed as %s" % res)[ticket] 202 202 yield (self.env.href.ticket(tid), 203 203 ticket + util.shorten_line(summary), 204 204 date, author,  
comment:3 by , 20 years ago
I'm not sure to understand all the bits and pieces of the XHTML/CSS stuff here, but why are we forcing a style for closed tickets, instead of applying a class "closed" to the ticket header ?
Hard-coding the style here prevents from look customization, doesn't it ?
(Again, I may miss some important piece of info)
comment:4 by , 20 years ago
Well, I did things that way in order to not disrupt too much the existing ISearchSource interface: The <a> element is currently produced by the Search component itself, out of the href and the text given by the ISearchSource. So there are basically two ways of producing a better output:
- Making the ISearchSource produce itself the <a>
 - Make the ISearchSource return class information
 
Either way needs a modification of the return type of ISearchSource.get_search_results.
comment:5 by , 20 years ago
Ok, I got it. Thanks for the explanation
Maybe we should track somewhere this point for a future improvement ?
comment:6 by , 20 years ago
As we've been talking for a long time about reimplementing the search facility for Trac 1.0, maybe we can gather the requirements for that new search facility in an AdvancedSearch page?
comment:8 by , 20 years ago
Just to keep with this ticket's topic, an API change that would make
sense would be to align the return type of ISearchSource.get_search_results
to the one of ITimelineEventProvider.get_timeline_events, i.e. 
- from (href, title, date, author, excerpt)
 - to (kind, href, title, date, author, message)
 
Maybe we can do this for 0.11?



  
Implemented in r3000. I wonder if I should add the resolution information, too?