feat: read jira base url
This commit is contained in:
parent
47f4f83d2b
commit
085f9177f6
@ -565,6 +565,12 @@
|
|||||||
|
|
||||||
var jiraFunctions = (function(module) {
|
var jiraFunctions = (function(module) {
|
||||||
module.name = "JIRA";
|
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(){
|
module.isEligible = function(){
|
||||||
return $("meta[name='application-name'][ content='JIRA']").length > 0;
|
return $("meta[name='application-name'][ content='JIRA']").length > 0;
|
||||||
@ -638,8 +644,8 @@
|
|||||||
issueData.superIssue.summary = data.fields.epicName;
|
issueData.superIssue.summary = data.fields.epicName;
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
issueData.url = window.location.origin + "/browse/" + issueData.key;
|
issueData.url = module.baseUrl() + "/browse/" + issueData.key;
|
||||||
|
|
||||||
//LRS Specific field mapping
|
//LRS Specific field mapping
|
||||||
if (true) {
|
if (true) {
|
||||||
@ -657,7 +663,7 @@
|
|||||||
|
|
||||||
module.getIssueData = function(issueKey) {
|
module.getIssueData = function(issueKey) {
|
||||||
//https://docs.atlassian.com/jira/REST/latest/
|
//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("IssueUrl: " + url);
|
||||||
//console.log("Issue: " + issueKey + " Loading...");
|
//console.log("Issue: " + issueKey + " Loading...");
|
||||||
return httpGetJSON(url).then(function(responseData) {
|
return httpGetJSON(url).then(function(responseData) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user