Closed Bug 789576 Opened 9 years ago Closed 9 years ago

Automatically linkify "bug XXXXXX" when present in tree status reason/motd


(Tree Management Graveyard :: TBPL, defect)

Not set


(Not tracked)



(Reporter: graememcc, Assigned: graememcc)




(1 file, 2 obsolete files)

Per catlee would prefer this is handled on the TBPL side rather than the TreeStatus side.

Again, I'm using the simple heuristic that a bug number followed by a </a> is already linked, and won't change it in this case.

I'm using {6,7} for the digit count: at this stage I assume any future tree closures are not going to be due to 5-digit bugs.
Attached patch v1 (obsolete) — Splinter Review
Attachment #659343 - Flags: review?(bmo)
Comment on attachment 659343 [details] [diff] [review]

Review of attachment 659343 [details] [diff] [review]:

We already have a function for that:
Use that and we are good to go :-)
Attachment #659343 - Flags: review-
Attached patch v2 (obsolete) — Splinter Review
Ah never spotted that - thanks!
Attachment #659343 - Attachment is obsolete: true
Attachment #659343 - Flags: review?(bmo)
Attachment #659351 - Flags: review?(arpad.borsos)
Comment on attachment 659351 [details] [diff] [review]

Review of attachment 659351 [details] [diff] [review]:

Good. Although it has no </a> handling, well then we just need to have the convention to not have linked bugs in the tree status.
Attachment #659351 - Flags: review?(arpad.borsos) → review+
Actually, that escapeContent() call in _linkBugs will prevent us adding other links in to the reason field - e.g. the wiki.m.o link in the current inbound message - the HTML will be rendered as plaintext.
Hm, I missed that then. So we could add another option to prevent that.
Attached patch v3Splinter Review
Added an additional parameter to _linkBugs to signal whether to escape the string. This let me reinstate the </a> check - it was redundant when the text was escaped.
Attachment #659351 - Attachment is obsolete: true
Attachment #659471 - Flags: review?(arpad.borsos)
Attachment #659471 - Flags: review?(arpad.borsos) → review+
Assignee: nobody → graememcc_firefox
Closed: 9 years ago
Resolution: --- → FIXED
Thank you for this Graeme! :-)
Depends on: 790559
Depends on: 805550
Product: Webtools → Tree Management
Product: Tree Management → Tree Management Graveyard
You need to log in before you can comment on or make changes to this bug.