Edgewall Software

Ticket #2859 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

Search results should emphasis closed tickets from other tickets

Reported by: eblot Owned by: jonas
Priority: low Milestone: 0.10
Component: search system Version: devel
Severity: trivial Keywords:
Cc:

Description

It would be nice if the search results reported the status of each ticket (closed or not) using the usual strike style.

Attachments

Change History

Changed 2 years ago by cboos

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to 0.10

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

Changed 2 years ago by cboos

Another place where chris' html.py++ would be handy :)

  • api.py

     
    197197        for summary,desc,author,keywords,tid,date,status in cursor: 
    198198            ticket = '#%d: ' % tid 
    199199            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] 
    202202            yield (self.env.href.ticket(tid), 
    203203                   ticket + util.shorten_line(summary), 
    204204                   date, author, 

Changed 2 years ago by eblot

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)

Changed 2 years ago by cboos

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.

Changed 2 years ago by eblot

Ok, I got it. Thanks for the explanation

Maybe we should track somewhere this point for a future improvement ?

Changed 2 years ago by cboos

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?

Changed 2 years ago by eblot

Yes, this would be probably easier to track the requirements

Changed 2 years ago by cboos

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?

Add/Change #2859 (Search results should emphasis closed tickets from other tickets)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.