Maven Changes Plugin
  1. Maven Changes Plugin
  2. MCHANGES-277

CLONE - TracDownloader does not set issue key to ticket id

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.6
    • Fix Version/s: None
    • Component/s: trac
    • Labels:
      None
    • Environment:
    • Patch Submitted:
      Yes
    • Number of attachments :
      0

      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):

      1. 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

      2. TracDownloader.createIssue(Object[]) - add
        // before call to issue.setId(String)
        issue.setKey String.valueOf( ticketObj[0] ) );
        

        Activity

        Markus Spann made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Won't Fix [ 2 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Markus Spann
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: