Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
2.6
-
None
-
None
-
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"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"
-
Patch
Description
TracDownloader.createIssue(Object[]) creates a new Issue 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
action.setIssue( issue.getKey() );
by
// fetch ticket id from issue.key or issue.id whichever is available action.setIssue( StringUtils.defaultIfEmpty(issue.getKey(), issue.getId()) );
or similar
- TracDownloader.createIssue(Object[]) - add
// before call to issue.setId(String) issue.setKey String.valueOf( ticketObj[0] ) );