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
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.6
    • Fix Version/s: None
    • 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

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        9m 8s 1 Markus Spann 29/Mar/12 06:57
        Mark Thomas made changes -
        Workflow jira [ 12955598 ] Default workflow, editable Closed status [ 12992947 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 22:40:15 UTC 2015 [ 1428273615853 ]
        Mark Thomas made changes -
        Patch Submitted Yes [ 10763 ]
        Flags Patch [ 10430 ]
        Mark Thomas made changes -
        Workflow jira [ 12718110 ] Default workflow, editable Closed status [ 12749423 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 09:14:45 UTC 2015 [ 1428225285377 ]
        Markus Spann made changes -
        Field Original Value New Value
        Resolution Won't Fix [ 2 ]
        Status Open [ 1 ] Closed [ 6 ]
        Markus Spann created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development