-
Bug
-
Resolution: Fixed
-
Low
-
None
-
4.3.7
-
JIRA Macros 4.0.18, 4.0.29
identifying of the applink, only checks for rpcurl!
class com.atlassian.confluence.extra.jira.JiraIssuesMacro
public String execute(Map parameters, String body, ConversionContext conversionContext) throws MacroExecutionException { ... else // if requestType == Type.URL { Iterable<ApplicationLink> applicationLinks = appLinkService.getApplicationLinks(JiraApplicationType.class); for (ApplicationLink applicationLink : applicationLinks) { // Dieter: where is the check for display url ? if (requestData.indexOf(applicationLink.getRpcUrl().toString()) == 0) { applink = applicationLink; break; } } } }
Steps to Reproduce
- Setup an application link with JIRA from Confluence Admin >> Application Links
- Set the Display URL to http://localhost:8511/jira (domain = localhost)
- Set the Application URL to http://127.0.0.1:8511/jira (no domain, IP address only)
- Navigate to JIRA via http://localhost:8511/jira , and obtain an xml representation of the Issue Navigator, example: http://localhost:8511/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+TEST&tempMax=1000
- Copy the URL of that XML view, and add a JIRA Issues macro to a Confluence page (Insert >> Other Macros >> JIRA Issues). Enter the url as the XML URL above, and hit Refresh. You will get a warning similar to below:
Inserting the macro this way will render the contents in static HTML. Changing the URL to this instead, solves the issue: http://127.0.0.1:8511/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+TEST&tempMax=1000 (change to application URL)
This applies to other situations as well, such as a proxy environment:
Application URL: http://10.90.2.2:8080/jira
Display URL: http://www.example.com/jira
Recommended Fix
class com.atlassian.confluence.extra.jira.JiraIssuesMacro
public String execute(Map parameters, String body, ConversionContext conversionContext) throws MacroExecutionException { ... if requestType == Type.URL { Iterable<ApplicationLink> applicationLinks = appLinkService.getApplicationLinks(JiraApplicationType.class); for (ApplicationLink applicationLink : applicationLinks) { /* requestData contains http://vldevhp04.at.inside:8888/jira (display url of application link) * so the condition will never be ==0 * because rpcUrl is http://127.0.0.1:8101/jira (rpc url of application link) * * the solution would be another check against display url! * else if (requestData.indexOf(applicationLink.getDisplayUrl().toString()) == 0) { * applink = applicationLink; * break; * } * */ if (requestData.indexOf(applicationLink.getRpcUrl().toString()) == 0) { applink = applicationLink; break; } } }
- relates to
-
CONFSERVER-29182 JIRA Issues macro links to application URL rather than display URL - the search link uses the application URL.
-
- Closed
-
- is cloned from
-
CONFJIRA-251 Failed to load
[CONFSERVER-29566] display applink "RpcUrl" in JiraIssuesMacro
Workflow | Original: JAC Bug Workflow v3 [ 2901892 ] | New: CONFSERVER Bug Workflow v4 [ 2996461 ] |
Workflow | Original: JAC Bug Workflow v2 [ 2798664 ] | New: JAC Bug Workflow v3 [ 2901892 ] |
Status | Original: Resolved [ 5 ] | New: Closed [ 6 ] |
Workflow | Original: JAC Bug Workflow [ 2729191 ] | New: JAC Bug Workflow v2 [ 2798664 ] |
Workflow | Original: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2394358 ] | New: JAC Bug Workflow [ 2729191 ] |
Workflow | Original: Confluence Workflow - Public Facing - Restricted v5 [ 2289808 ] | New: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2394358 ] |
Workflow | Original: Confluence Workflow - Public Facing - Restricted v5.1 - TEMP [ 2228048 ] | New: Confluence Workflow - Public Facing - Restricted v5 [ 2289808 ] |
Workflow | Original: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2184081 ] | New: Confluence Workflow - Public Facing - Restricted v5.1 - TEMP [ 2228048 ] |
Workflow | Original: Confluence Workflow - Public Facing - Restricted v5 [ 1925566 ] | New: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2184081 ] |
Workflow | Original: Confluence Workflow - Public Facing - Restricted v3 [ 1734880 ] | New: Confluence Workflow - Public Facing - Restricted v5 [ 1925566 ] |
Workflow | Original: CONF Bug Subtask WF (TEMP) [ 1685754 ] | New: Confluence Workflow - Public Facing - Restricted v3 [ 1734880 ] |