Maven 1.x JIRA Plugin
  1. Maven 1.x JIRA Plugin
  2. MPJIRA-4

<issueTrackingUrl> must contain an "id" attribute

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.2
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Although the following URLs are equivelement, only the one containing the "id" attribute will work with the JIRA plugin.
      http://nagoya.apache.org/jira/secure/BrowseProject.jspa?id=10492
      http://nagoya.apache.org/jira/browse/JS2

      When using "http://nagoya.apache.org/jira/browse/JS2" for the <issueTrackerUrl> the following error is received. Notice the "pid" attribute on the url.

      Downloading http://nagoya.apache.org/jira/browse/secure/IssueNavigator.jspa?view=rss&pid=p://nagoya.apache.org/jira/browse/JS2&sorter/field=issuekey&sorter/order=DESC&sorter/field=status&sorter/order=DESC&tempMax=1000&reset=true
      Received: [404] for http://nagoya.apache.org/jira/browse/secure/IssueNavigator.jspa?view=rss&pid=p://nagoya.apache.org/jira/browse/JS2&sorter/field=issuekey&sorter/order=DESC&sorter/field=status&sorter/order=DESC&tempMax=1000&reset=true
      Received: [404] for http://nagoya.apache.org/jira/browse/secure/IssueNavigator.jspa?view=rss&pid=p://nagoya.apache.org/jira/browse/JS2&sorter/field=issuekey&sorter/order=DESC&sorter/field=status&sorter/order=DESC&tempMax=1000&reset=true

      BUILD FAILED
      File...... c:\maven_repo\1.0-rc4\cache\maven-xdoc-plugin-1.7.2\plugin.jelly
      Element... x:parse
      Line...... 119
      Column.... 48
      Error on line 27 of document file:/C:/cvs_apache/jakarta-jetspeed-2/target/jira/jira-results.xml : The element type "link" must be terminated by the matching end-tag "</link>". Nested exception: The element type "link" must be terminated by the matching end-tag "</link>".
      Total time: 4 seconds
      Finished at: Sat Jul 10 05:31:54 EDT 2004

      C:\cvs_apache\jakarta-jetspeed-2>

        Activity

        Hide
        Emmanuel Venisse added a comment -

        I don't know how to obtain the xml result with the id (like JS2). And you?

        Show
        Emmanuel Venisse added a comment - I don't know how to obtain the xml result with the id (like JS2). And you?
        Hide
        Paul Spencer added a comment -

        I do not know how to know the answer either. The folks at Jira should know the answer.

        Show
        Paul Spencer added a comment - I do not know how to know the answer either. The folks at Jira should know the answer.
        Hide
        Michael Franken added a comment -

        you could simply fix this by checking the result of

        String url = ((Project)getProject()).getIssueTrackingUrl();
        int pos = url.indexOf("?");
        String id = url.substring(pos + 4);

        in JiraDownloader.java

        make the id empty string if pos < 0

        Show
        Michael Franken added a comment - you could simply fix this by checking the result of String url = ((Project)getProject()).getIssueTrackingUrl(); int pos = url.indexOf("?"); String id = url.substring(pos + 4); in JiraDownloader.java make the id empty string if pos < 0
        Hide
        Carlos Sanchez added a comment -

        pid is empty now if the url doesn't contain an id.
        TODO: fail the build in that case

        Show
        Carlos Sanchez added a comment - pid is empty now if the url doesn't contain an id. TODO: fail the build in that case
        Hide
        fabrizio giustina added a comment -

        Fixed by downloading the project page and extracting a project id from it

        Show
        fabrizio giustina added a comment - Fixed by downloading the project page and extracting a project id from it

          People

          • Assignee:
            fabrizio giustina
            Reporter:
            Paul Spencer
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: