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

TracDownloader does not set issue key to ticket id

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.9
    • Component/s: trac
    • Labels:
      None
    • Environment:
    • Flags:
      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] ) );
        

        Activity

        Markus Spann created issue -
        Dennis Lundberg made changes -
        Field Original Value New Value
        Assignee Dennis Lundberg [ dennislundberg ]
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 2.9 [ 18785 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 09:14:45 UTC 2015 [ 1428225285377 ]
        Mark Thomas made changes -
        Workflow jira [ 12718109 ] Default workflow, editable Closed status [ 12749420 ]
        Mark Thomas made changes -
        Patch Submitted Yes [ 10763 ]
        Flags Patch [ 10430 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 22:40:15 UTC 2015 [ 1428273615853 ]
        Mark Thomas made changes -
        Workflow jira [ 12955588 ] Default workflow, editable Closed status [ 12992929 ]
        Mark Thomas made changes -
        Assignee dennislundberg [ dennislundberg ] Dennis Lundberg [ dennisl@apache.org ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development