[
http://jira.codehaus.org/browse/MCHANGES-166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=184918#action_184918
]
Karl Heinz Marbaise edited comment on MCHANGES-166 at 7/26/09 10:51 AM:
------------------------------------------------------------------------
The patch contains a fix for this issue.
The main problem was that the setIssueLink() method overwrites the contents of
the hashmap independent if the hash map contains already a value with the key
"default" which has been set by issueTemplatesPerSystem.
The method canGenerateIssueLinks( String system ) has checked the URL of the
issueManagement if it was empty no links have been created. In my opinion the
method should check the URL only if the URL_TOKEN is present in the issueLink
otherwise it should left the link untouched.
The private method parseIssueLink(...) should remove only the trailing slash
from the URL if one exists. This prevents cases where we miss to give a
trailing slash in the issueManagement.url.
With this patch the earlier mentioned suggestion only to define
<default>http://xxxx/%ISSUE%</default> will work without giving the
issueManagement.url...
We should not miss to add an appropiate unit Test(s) and of course not missing
the documentation for that behaviour.
was (Author: khmarbaise):
The patch contains a fix for this issue.
The main problem was that the setIssueLink() method overwrites the contents of
the hashmap independent if the hash map contains already a value with the key
"default" which has been set by issueTemplatesPerSystem.
The method canGenerateIssueLinks( String system ) has checked the URL of the
issueManagement if it was empty no links have been created. In my opinion the
method should check the URL only if the URL_TOKEN is present in the issueLink
otherwise it should left the link untouched.
The private method parseIssueLink(...) should remove only the trailing slash
from the URL if one exists. This prevents cases where we miss to give a
trailing slash in the issueManagement.url.
With this patch the earlier mentioned suggestion only to define
<default>http://xxxx/%ISSUE%</default> will work without giving the
issueManagement.url...
> Problem with issueLinkTemplatePerSystem
> ----------------------------------------
>
> Key: MCHANGES-166
> URL: http://jira.codehaus.org/browse/MCHANGES-166
> Project: Maven 2.x Changes Plugin
> Issue Type: Bug
> Components: changes-report
> Affects Versions: 2.1
> Environment: all
> Reporter: Karl Heinz Marbaise
> Fix For: 2.2
>
> Attachments: patch-mchanges-166.patch
>
>
> I have a pom where i defined the issueManagement part as follows:
> <issueManagement>
> <system>Redmine</system>
> <url>http://www.supose.org</url>
> </issueManagement>
> and in the configuration section of the maven-changes-plugin as follows:
> <issueLinkTemplatePerSystem>
> <Redmine>http://www.supose.org/issues/show/%ISSUE%</Redmine>
> </issueLinkTemplatePerSystem>
> but if i do a mvn changes:changes-report
> I get links with "viewissue.jspa/?key=..." ...assuming the entries in
> changes.xml used no type so type="default" is assumed here...but the default
> URL is used instead the
> above one.
> If i use
>
> <issueLinkTemplate>http://www.supose.org/issues/show/%ISSUE%</issueLinkTemplate>
> in the pom instead for configuration i got correct links but a DEPRECATED
> warning during site build.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira