Mapping External Links in Comments

Hi,

I'm having a problem getting mapping extenral links in comments. I've tried adding the following to main-config.xml:

<comment-transformation>
<transformation-pattern search="Testing" replace="hope this works" description="A case link" />
</comment-transformation>

I then commit a change with the comment including the word "Testing", but it doesn't get replaced with "hope this works".

What am I doing wrong?
Thanks
Akash

10 comments

I've copied your pattern to our production server config and it did work.

Please provide more details on actions you performing, expected and
actual result.

akash chopra wrote:

Hi,

I'm having a problem getting mapping extenral links in comments. I've tried adding the following to main-config.xml:

<comment-transformation>
<transformation-pattern search="Testing" replace="hope this works" description="A case link" />
</comment-transformation>

I then commit a change with the comment including the word "Testing", but it doesn't get replaced with "hope this works".

What am I doing wrong?
Thanks
Akash



--
Alexey Gopachenko
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

I'm using v3.1.1.

I suspect I am simply misunderstanding what this feature is meant to do. My understanding was that I could enter specific text into my commit comment, and that TeamCity would pick out that text and convert it into a hyperlink to our issue tracker, and that this hyperlink would be displayed in the "Change Log" tab.

So, in my simplified example I posted originally, I would expect the word "Testing" in my commit comment to be changed to "Hope this works".

Also, if I make a mistake in the "replace" attribute I get an error when I click on the "Change Log" tab, suggesting that the config file is being processed correctly e.g. I mistyped &quote; and was warned that:

Critical error in configuration file C:\Documents and Settings\akashc\.BuildServer\config\main-config.xml:
Error on line 18 of document file:/C:/Documents%20and%20Settings/akashc/.BuildServer/config/main-config.xml: The entity "quote" was referenced, but not declared.

Thanks
Akash

0

It worked just as you expected for me.
Did you entered your comment in expected case?

akash chopra wrote:

I'm using v3.1.1.

I suspect I am simply misunderstanding what this feature is meant to do. My understanding was that I could enter specific text into my commit comment, and that TeamCity would pick out that text and convert it into a hyperlink to our issue tracker, and that this hyperlink would be displayed in the "Change Log" tab.

So, in my simplified example I posted originally, I would expect the word "Testing" in my commit comment to be changed to "Hope this works".

Also, if I make a mistake in the "replace" attribute I get an error when I click on the "Change Log" tab, suggesting that the config file is being processed correctly e.g. I mistyped &quote; and was warned that:

Critical error in configuration file C:\Documents and Settings\akashc\.BuildServer\config\main-config.xml:
Error on line 18 of document file:/C:/Documents%20and%20Settings/akashc/.BuildServer/config/main-config.xml: The entity "quote" was referenced, but not declared.

Thanks
Akash



--
Alexey Gopachenko
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

I've just checked again, and the comment is in the expected case - see attached screenshot.



Attachment(s):
teamcity.JPG
0

hi akash,
i have the same problem as you described here. did you already find a solution?

erik

0

We can't reproduce this behavior.

Any chances that your cases have something in common?

Can you please provide more data on your setup:
- exact database version and TeamCity database locale
- source control system and its exact version number
- main.xml file ecnoding, server VM default encoding and locale properties

Erik wrote:

hi akash,
i have the same problem as you described here. did you already find a solution?

erik



--
Alexey Gopachenko
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

We can't reproduce this behavior.

Any chances that your cases have something in common?

Can you please provide more data on your setup:
- exact database version and TeamCity database locale

hsqldb provided with TC (3.1.1), but also same problem on MySQL 4.1.12

- source control system and its exact version number

Subversion 1.4.4 (r25188)

- main.xml file ecnoding, server VM default encoding and locale properties

i'm not sure about this. it's running on Windows 2003 server (US). other settings from main-config.xml file are read correctly (e.g. rootURL).

on which pages in TC it should do this translation? (comments are shown on several places)
and should transformation be run when updating the changes from VCS (and saving the transformed string in db) or is transformation done when the comment is shown somewhere?


Alexey Gopachenko
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

regards,
erik

0

Can you please provide more data on your setup:
- exact database version and TeamCity database locale
- source control system and its exact version number
- main.xml file ecnoding, server VM default encoding and locale properties


MySQL 5.0.51a; TC 3.1.1
Subversion 1.4.5-r25188
Default English (UK) settings

0

Transformation is applied on the fly in all places where comment is visible.

...looks like both of you have Subversion 1.4.4 (r25188).
I'll check if that can have some relation to the problem.



--
Alexey Gopachenko
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

I had the same issue and solved it.
Apparently there is an empty <comment-transformation/> located before the <report-tab> tags (which I overlooked).
If you add a <comment-transformation> right before the closing </server> tag, the first found empty <comment-transformation/> tag is used, and not your newly added comment-transformation

hope this helps

Koen

0

Please sign in to leave a comment.