Edgewall Software
Modify

Ticket #2859 (closed enhancement: fixed)

Opened 6 years ago

Last modified 6 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:
Release Notes:
API 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

Change History

comment:1 Changed 6 years ago by cboos

  • Milestone set to 0.10
  • Resolution set to fixed
  • Status changed from new to closed

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

comment:2 Changed 6 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, 

comment:3 Changed 6 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)

comment:4 Changed 6 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.

comment:5 Changed 6 years ago by eblot

Ok, I got it. Thanks for the explanation

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

comment:6 Changed 6 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?

comment:7 Changed 6 years ago by eblot

Yes, this would be probably easier to track the requirements

comment:8 Changed 6 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?

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from jonas. Next status will be 'closed'
Author


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

 
Note: See TracTickets for help on using tickets.