LogABug: Publish URL of current page

Add the URL of the current page to the comment section when reporting a
bug. The clouddocs-maven-plugin did this and it is helpful to quickly
locate the page where the error was reported against.

Change-Id: Ia104739b7f4140c35d23c80c57ec52261268a1bf
This commit is contained in:
Andreas Jaeger
2015-06-02 19:59:35 +02:00
parent ec929fa008
commit b9f2cef1ad

View File

@@ -129,8 +129,10 @@ $('div.warning > p.admonition-title').text(function(ignored_para,original) {
function logABug(bugTitle, fieldComment, fieldTags) {
var lineFeed = "%0A";
var urlBase = "https://bugs.launchpad.net/openstack-manuals/+filebug?field.title="
var currentURL = "URL: " + window.location.href;
var bugLink = urlBase + encodeURIComponent(bugTitle) +
"&field.comment=" + lineFeed + lineFeed + "-----------------------------------" + lineFeed + fieldComment +
lineFeed + currentURL +
"&field.tags=" + fieldTags;
document.getElementById("logABugLink1").href=bugLink;
document.getElementById("logABugLink2").href=bugLink;