Add first version of the script in thread
Patch with second version in thread by Re Ra
Make it able to 'uglyly' check against more than one ticket
Reindent