Modify

Opened 2 years ago

Closed 2 years ago

#10055 closed defect (fixed)

Class name for ticket number's <span> is wrong

Reported by: keshav.kini@… Owned by: rjollos
Priority: normal Component: DuplicateTicketSearchPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

A ticket number in the search results which has status "closed" and resolution "duplicate" is displayed with the following HTML:

<span class="closed: duplicate">#12704</span>

The correct way to name the class, which corresponds with the display style of ticket numbers in Trac's native wiki formatting output, would be the following:

<span class="closed duplicate">#12704</span>

The current behavior causes custom CSS styles to fail to apply to this ticket, as colons are not allowed in class names.

Attachments (0)

Change History (4)

comment:1 Changed 2 years ago by rjollos

  • Status changed from new to assigned

Finally got around to attempting to fix this. There was an error in the summaryRegex.

I have a question though. If I add the wiki markup #2, with ticket #2 being closed, inspecting the element displays a.closed.ticket. Inspecting the #2 displayed by DuplicateTicketSearchPlugin displays span.closed, and you had proposed span.closed.<resolution>. Do we want to add the resolution to the class, or rather trying to emulate the WikiMarkup - that is, drop the span and append ticket to the class for the a element?

CSS is not my strong suite, so I'd appreciate any guidance you can provide. I've bumped the plugin revision to 1.0.2, but added the dev tag until we have resolution on this issue.

comment:2 Changed 2 years ago by rjollos

(In [11762]) Refs #10055:

  • Fixed error in regex which led to incorrect CSS class being applied to the matches.
  • Renamed the 0.11 branch to trunk.

comment:3 Changed 2 years ago by rjollos

Somehow that got split into two commits so you can't see the changes (also [11763]). The fix was on line 102 of tracDupeSearch.js:

var summaryRegex = /#(\d+)<\/span>:\s*(.*):\s*(.*)\s*\((.*)(?:\: (.*))?\)$/i;

-->

var summaryRegex = /#(\d+)<\/span>:\s*(.*):\s*(.*)\s*\(([^:.]*)(?:\: (.*))?\)$/i;

comment:4 Changed 2 years ago by rjollos

  • Resolution set to fixed
  • Status changed from assigned to closed

Please reopen if this isn't working correctly for you, or if you have more feedback.

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from rjollos. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.