Edgewall Software

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#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:


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 Christian Boos, 13 years ago

Milestone: 0.10
Resolution: fixed
Status: newclosed

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

comment:2 by Christian Boos, 13 years ago

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,

comment:3 by Emmanuel Blot, 13 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 Christian Boos, 13 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 Emmanuel Blot, 13 years ago

Ok, I got it. Thanks for the explanation

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

comment:6 by Christian Boos, 13 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:7 by Emmanuel Blot, 13 years ago

Yes, this would be probably easier to track the requirements

comment:8 by Christian Boos, 13 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?

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Jonas Borgström.
The resolution will be deleted.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.