Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 789576 - Automatically linkify "bug XXXXXX" when present in tree status reason/motd
: Automatically linkify "bug XXXXXX" when present in tree status reason/motd
Product: Tree Management Graveyard
Classification: Graveyard
Component: TBPL (show other bugs)
: Trunk
: All All
: -- normal
: ---
Assigned To: Graeme McCutcheon [:graememcc]
Depends on: 790559 805550
  Show dependency treegraph
Reported: 2012-09-07 13:32 PDT by Graeme McCutcheon [:graememcc]
Modified: 2015-04-13 15:57 PDT (History)
3 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---

v1 (1.48 KB, patch)
2012-09-07 13:34 PDT, Graeme McCutcheon [:graememcc]
arpad.borsos: review-
Details | Diff | Splinter Review
v2 (1.13 KB, patch)
2012-09-07 14:00 PDT, Graeme McCutcheon [:graememcc]
arpad.borsos: review+
Details | Diff | Splinter Review
v3 (3.30 KB, patch)
2012-09-08 04:00 PDT, Graeme McCutcheon [:graememcc]
arpad.borsos: review+
Details | Diff | Splinter Review

Description Graeme McCutcheon [:graememcc] 2012-09-07 13:32:17 PDT
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.
Comment 1 Graeme McCutcheon [:graememcc] 2012-09-07 13:34:02 PDT
Created attachment 659343 [details] [diff] [review]
Comment 2 Arpad Borsos [:Swatinem] 2012-09-07 13:42:37 PDT
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 :-)
Comment 3 Graeme McCutcheon [:graememcc] 2012-09-07 14:00:11 PDT
Created attachment 659351 [details] [diff] [review]

Ah never spotted that - thanks!
Comment 4 Arpad Borsos [:Swatinem] 2012-09-07 14:17:27 PDT
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.
Comment 5 Graeme McCutcheon [:graememcc] 2012-09-07 14:22:19 PDT
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.
Comment 6 Arpad Borsos [:Swatinem] 2012-09-07 14:25:04 PDT
Hm, I missed that then. So we could add another option to prevent that.
Comment 7 Graeme McCutcheon [:graememcc] 2012-09-08 04:00:00 PDT
Created attachment 659471 [details] [diff] [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.
Comment 9 Ed Morley [:emorley] 2012-09-08 07:23:56 PDT
Thank you for this Graeme! :-)

Note You need to log in before you can comment on or make changes to this bug.