diff --git a/openstackdocstheme/theme/openstackdocs/script_footer.html b/openstackdocstheme/theme/openstackdocs/script_footer.html index b1b1891..70f6401 100644 --- a/openstackdocstheme/theme/openstackdocs/script_footer.html +++ b/openstackdocstheme/theme/openstackdocs/script_footer.html @@ -36,6 +36,11 @@ /* gitsha, project and bug_tag rely on variables in conf.py */ var gitSha = "SHA: {{ gitsha }}"; + {%- if bug_project %} + var bugProject = "{{ bug_project }}"; + {%- else %} + var bugProject = "openstack-manuals"; + {%- endif %} var bugTitle = "{{ title }} in {{ project }}"; var fieldTags = "{{ bug_tag }}"; @@ -48,7 +53,7 @@ lineFeed + encodeURI(gitSha) + lineFeed + encodeURI(gitURL) ; - logABug(bugTitle, fieldComment, fieldTags); + logABug(bugTitle, bugProject, fieldComment, fieldTags); diff --git a/openstackdocstheme/theme/openstackdocs/static/js/docs.js b/openstackdocstheme/theme/openstackdocs/static/js/docs.js index 5c05e2a..99013e9 100644 --- a/openstackdocstheme/theme/openstackdocs/static/js/docs.js +++ b/openstackdocstheme/theme/openstackdocs/static/js/docs.js @@ -126,9 +126,9 @@ $('div.warning > p.admonition-title').text(function(ignored_para,original) { // Gives the log a bug icon the information it needs to generate the bug in // Launchpad with pre-filled information such as git SHA, git.openstack.org // source URL, published document URL and tag. -function logABug(bugTitle, fieldComment, fieldTags) { +function logABug(bugTitle, bugProject, fieldComment, fieldTags) { var lineFeed = "%0A"; - var urlBase = "https://bugs.launchpad.net/openstack-manuals/+filebug?field.title=" + var urlBase = "https://bugs.launchpad.net/" + bugProject + "/+filebug?field.title=" var currentURL = "URL: " + window.location.href; var bugLink = urlBase + encodeURIComponent(bugTitle) + "&field.comment=" + lineFeed + lineFeed + "-----------------------------------" + lineFeed + fieldComment + diff --git a/releasenotes/notes/bug-project-e9ff50f6149d2be1.yaml b/releasenotes/notes/bug-project-e9ff50f6149d2be1.yaml new file mode 100644 index 0000000..9861b2e --- /dev/null +++ b/releasenotes/notes/bug-project-e9ff50f6149d2be1.yaml @@ -0,0 +1,5 @@ +--- +features: + - Some teams use openstackdocstheme which have each launchpad project. + To report a bug to the appropriate project directly, + enable each project to define the bug report project.