Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 406446

Summary: {OrionHome} is relative in plugins
Product: [ECD] Orion Reporter: Malgorzata Janczarska <malgorzata.tomczyk>
Component: ClientAssignee: Project Inbox <orion.client-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: simon_kaegi
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Malgorzata Janczarska CLA 2013-04-24 10:33:24 EDT
When we create links in plugins using orion.page.link and orion.page.link.related we can use {OrionHome} variable. It used to be an absolute path, now it's relative. It's OK when we want to use it in the host part of the link, but the problem occurs when we want to use it to generate locations for the hash. Then we are adding relative paths to the hash, but the paths are not relative to the target page, but to the page on which the generated links are shown.

Example link for orion server running on localhost:8080/cc/:
http://localhost:8080/cc/jazzui/project.html#../jazz/Extra/Project?url=https://jazzdev02.torolab.ibm.com:9443/jazz02/&name=Perfect%20Storm&uuid=_78LbwHrPEeKwv5G_HYY8SA&user=mtomczyk
instead of "../jazz/Extra" we should have "localhost:8080/cc/jazz/Extra".
Comment 1 Simon Kaegi CLA 2013-04-24 17:56:43 EDT
Ah... ok in those cases should use orion/URL-shim to get us an absolute url.

e.g.
var url = new URL(require.toUrl("jazz/Extra/Project"), window.location.href).href;
Comment 2 Malgorzata Janczarska CLA 2013-04-25 06:19:53 EDT
(In reply to comment #1)
> Ah... ok in those cases should use orion/URL-shim to get us an absolute url.
OK