Ticket #10055 (closed defect: fixed)

Opened 1 year ago

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

Reported by: Assigned to: keshav.kini@gmail.com rjollos normal DuplicateTicketSearchPlugin normal 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.

Change History

07/24/12 04:12:26 changed 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.

07/24/12 04:15:48 changed 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.

07/24/12 04:21:04 changed 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;


08/01/12 05:16:43 changed by rjollos

• status changed from assigned to closed.
• resolution set to fixed.

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

Add/Change #10055 (Class name for ticket number's <span> is wrong)

Change Properties