|
Markus Spann created MCHANGES-277:
------------------------------------- Summary: CLONE - TracDownloader does not set issue key to ticket id Key: MCHANGES-277 URL: https://jira.codehaus.org/browse/MCHANGES-277 Project: Maven 2.x Changes Plugin Issue Type: Bug Components: trac Affects Versions: 2.6 Environment: mvn --version : Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100) Maven home: /opt/local/apache-maven-3.0.4 Java version: 1.6.0_20, vendor: Sun Microsystems Inc. Java home: /usr/lib/jvm/java-6-openjdk/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "2.6.32-40-generic", arch: "i386", family: "unix" Reporter: Markus Spann [{{TracDownloader.createIssue(Object\[\])}}|http://maven.apache.org/plugins/maven-changes-plugin/apidocs/org/apache/maven/plugin/trac/TracDownloader.html] creates a new [{{Issue}}|http://maven.apache.org/plugins/maven-changes-plugin/apidocs/org/apache/maven/plugin/issues/Issue.html] object for each execution of the XmlRpc query {{ticket.get}}. The downloader sets Trac ticket id in field {{issue.id}} but not in {{issue.key}}. Later the generic IssueAdapter creates {{Action}} objects from {{Issue}} in {{IssueAdapter.createAction(Issue)}} and sets {{Action.issue}} (the ticket Id) to {{issue.getKey()}} which is null as it was never set by {{TracDownloader}}. Suggested patches (either one will address the problem): # {{IssueAdapter.createAction(Issue)}} - replace {code:java} action.setIssue( issue.getKey() ); {code} by {code:java} // fetch ticket id from issue.key or issue.id whichever is available action.setIssue( StringUtils.defaultIfEmpty(issue.getKey(), issue.getId()) ); {code} or similar # {{TracDownloader.createIssue(Object[])}} - add {code:java} // before call to issue.setId(String) issue.setKey String.valueOf( ticketObj[0] ) ); {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
[ https://jira.codehaus.org/browse/MCHANGES-277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Markus Spann closed MCHANGES-277. --------------------------------- Resolution: Won't Fix > CLONE - TracDownloader does not set issue key to ticket id > ---------------------------------------------------------- > > Key: MCHANGES-277 > URL: https://jira.codehaus.org/browse/MCHANGES-277 > Project: Maven 2.x Changes Plugin > Issue Type: Bug > Components: trac > Affects Versions: 2.6 > Environment: mvn --version : > Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100) > Maven home: /opt/local/apache-maven-3.0.4 > Java version: 1.6.0_20, vendor: Sun Microsystems Inc. > Java home: /usr/lib/jvm/java-6-openjdk/jre > Default locale: en_US, platform encoding: UTF-8 > OS name: "linux", version: "2.6.32-40-generic", arch: "i386", family: "unix" > Reporter: Markus Spann > > [{{TracDownloader.createIssue(Object\[\])}}|http://maven.apache.org/plugins/maven-changes-plugin/apidocs/org/apache/maven/plugin/trac/TracDownloader.html] creates a new [{{Issue}}|http://maven.apache.org/plugins/maven-changes-plugin/apidocs/org/apache/maven/plugin/issues/Issue.html] object for each execution of the XmlRpc query {{ticket.get}}. The downloader sets Trac ticket id in field {{issue.id}} but not in {{issue.key}}. > Later the generic IssueAdapter creates {{Action}} objects from {{Issue}} in {{IssueAdapter.createAction(Issue)}} and sets {{Action.issue}} (the ticket Id) to {{issue.getKey()}} which is null as it was never set by {{TracDownloader}}. > Suggested patches (either one will address the problem): > # {{IssueAdapter.createAction(Issue)}} - replace > {code:java} > action.setIssue( issue.getKey() ); > {code} > by > {code:java} > // fetch ticket id from issue.key or issue.id whichever is available > action.setIssue( StringUtils.defaultIfEmpty(issue.getKey(), issue.getId()) ); > {code} or similar > # {{TracDownloader.createIssue(Object[])}} - add > {code:java} > // before call to issue.setId(String) > issue.setKey String.valueOf( ticketObj[0] ) ); > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
| Powered by Nabble | Edit this page |
