Uploaded image for project: 'Maven Changes Plugin'
  1. Maven Changes Plugin
  2. MCHANGES-277

CLONE - TracDownloader does not set issue key to ticket id

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 2.6
    • None
    • trac
    • None
    • 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):

      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] ) );
        

      Attachments

        Activity

          People

            Unassigned Unassigned
            spannjp Markus Spann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: