Re: hyperlink "scrNNN" as well as "issueNNNN"

John Kristensen <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.user
Message-ID <[email protected]>
Hello John,

On 26/09/12 03:03, J Arrizza wrote:
> Right now the message area will hyperlink "Issue123" to jump to the
> issue 123.
>
> We also use the term "scr" (software change request) instead of "issue",
> so my question is simple: is there a way to modify the code to recognize
> "scrNNN" and "issueNNN" and convert both to hyperlinks?
>
> Thanks in advance
> John
>

You could achieve this by using a template extension util.

An example of a util for substituting strings with links using regexs 
can be found in the roundup issue tracker template:
 
http://roundup.hg.sourceforge.net/hgweb/roundup/roundup/file/a099ff2ceff3/website/issues/extensions/local_replace.py

(note that function is registered as 'localReplace')

You can then use this util by wrapping the msg content in the 
utils.localReplace() function:
 
http://roundup.hg.sourceforge.net/hgweb/roundup/roundup/file/a099ff2ceff3/website/issues/html/issue.item.html#l250

There is a bit of doco about the utils variable, but the examples above 
are probably more useful:
   http://roundup.sourceforge.net/docs/customizing.html#the-utils-variable

Cheers,
John.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.