Roundup Wiki

It's a common use case to have your tracker system somehow integrated within your Source Control Manager. A simple way I found to do this is to have keywords in the item messages that expand to hyperlinks.

Hence, if you type in the item's note textbox something like 'This problem is solved in Version:35' the recipe I present here lets roundup expands such message with an hyperlink in 'Version:35' that points to a custom Versioning system.

This solution is very customizable and you may find many others useful cases.

Procedures

1) In issue.item.html replace the line where it says
  • '"structure msg.content.hyperlinked"'
by
  • '"structure python:utils.localReplace(msg.content.hyperlinked())"'
2) In your 'extensions' directory, create a file 'local_replace.py' with
  • from custom_tags import CustomTags def localReplace(aMessage):

    def init(instance):
    • instance.registerUtil('localReplace', localReplace)
3) Add the custom_tags.py to a directory where Roundup can find it (I'd use python's site-packages --see "footnote":#footnote) customizing the 'substitute' attribute for your own needs.

All the specific work you need to do is in this variable. Read the CustomTags class doc for details.

Ask any question at the roundup users mailing list or by email to hfoffani@gmail.com.

Regards,

-Hernan.

custom_tags.py::

<a name="footnote">How to use site-packages for custom scripts.</a>

- Make a subdirectory under 'PYTHONPATH/Lib/site-packages' where you can place your convenience files, say 'mycompany'. Python won't touch those on future upgrades.

- Create an empty file called 'init.py' (that's two underscores before and after.)

- Place 'custom_tags.py' there. In this case 'local_replace.py' must import this file as: 'from mycompany.custom_tags import CustomTags'

Back to top LinkFormattingExample

Back to roundup's FrontPage