diff --git a/src/main/java/org/freedomsponsors/plugins/jira/SponsorThis.java b/src/main/java/org/freedomsponsors/plugins/jira/SponsorThis.java
index e2d3a36..3645e44 100644
--- a/src/main/java/org/freedomsponsors/plugins/jira/SponsorThis.java
+++ b/src/main/java/org/freedomsponsors/plugins/jira/SponsorThis.java
@@ -2,6 +2,7 @@
import com.atlassian.crowd.embedded.api.User;
import com.atlassian.jira.config.properties.APKeys.JiraIndexConfiguration;
+import com.atlassian.jira.config.properties.ApplicationProperties;
import com.atlassian.jira.functest.config.JiraConfig;
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.plugin.webfragment.contextproviders.AbstractJiraContextProvider;
@@ -15,15 +16,21 @@
public class SponsorThis extends AbstractJiraContextProvider
{
+ private final ApplicationProperties applicationProperties;
+
+ public SponsorThis(ApplicationProperties applicationProperties) // magic constructor
+ {
+ this.applicationProperties = applicationProperties;
+ }
@Override
public Map getContextMap(User user, JiraHelper jiraHelper) {
Map contextMap = new HashMap();
- //String baseUrl = (String)jiraHelper.getContextParams().get("baseurl");
+ String baseUrl = applicationProperties.getString("jira.baseurl");
Issue currentIssue = (Issue) jiraHelper.getContextParams().get("issue");
String issueKey = currentIssue.getKey();
contextMap.put("issueKey", issueKey);
- //contextMap.put("baseUrl", baseUrl);
+ contextMap.put("baseUrl", baseUrl);
return contextMap;
diff --git a/src/main/resources/atlassian-plugin.xml b/src/main/resources/atlassian-plugin.xml
index 6a9c450..68352e9 100644
--- a/src/main/resources/atlassian-plugin.xml
+++ b/src/main/resources/atlassian-plugin.xml
@@ -9,13 +9,14 @@
- Sponsor $issue.key on FreedomSponsors.org $issue.project.url + Sponsor $issueKey on FreedomSponsors.org
\ No newline at end of file diff --git a/target/jira-1.0-SNAPSHOT.jar b/target/jira-1.0-SNAPSHOT.jar index 40f7b13..b9adb77 100644 Binary files a/target/jira-1.0-SNAPSHOT.jar and b/target/jira-1.0-SNAPSHOT.jar differ