feat: read jira base url
This commit is contained in:
parent
47f4f83d2b
commit
085f9177f6
@ -566,6 +566,12 @@
|
||||
var jiraFunctions = (function(module) {
|
||||
module.name = "JIRA";
|
||||
|
||||
module.baseUrl = function() {
|
||||
var jiraBaseUrl = window.location.origin;
|
||||
try { jiraBaseUrl = $("meta[name='ajs-jira-base-url']").attr('content'); } catch(ex){}
|
||||
return jiraBaseUrl
|
||||
}
|
||||
|
||||
module.isEligible = function(){
|
||||
return $("meta[name='application-name'][ content='JIRA']").length > 0;
|
||||
}
|
||||
@ -639,7 +645,7 @@
|
||||
}));
|
||||
}
|
||||
|
||||
issueData.url = window.location.origin + "/browse/" + issueData.key;
|
||||
issueData.url = module.baseUrl() + "/browse/" + issueData.key;
|
||||
|
||||
//LRS Specific field mapping
|
||||
if (true) {
|
||||
@ -657,7 +663,7 @@
|
||||
|
||||
module.getIssueData = function(issueKey) {
|
||||
//https://docs.atlassian.com/jira/REST/latest/
|
||||
var url = '/rest/api/2/issue/' + issueKey + '?expand=renderedFields,names';
|
||||
var url = module.baseUrl() + '/rest/api/2/issue/' + issueKey + '?expand=renderedFields,names';
|
||||
console.log("IssueUrl: " + url);
|
||||
//console.log("Issue: " + issueKey + " Loading...");
|
||||
return httpGetJSON(url).then(function(responseData) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user