From 1f6d0dd079615a2b11ab9c4baeb7b25f1ae09558 Mon Sep 17 00:00:00 2001 From: Arthur Casals Date: Tue, 7 Aug 2012 06:10:29 -0300 Subject: [PATCH] Corrected context bugs at atlassian-plugin.xml --- .../plugins/jira/SponsorThis.java | 11 +++++++++-- src/main/resources/atlassian-plugin.xml | 5 +++-- src/main/resources/sponsorthis.vm | 2 +- target/jira-1.0-SNAPSHOT.jar | Bin 39138 -> 39291 bytes 4 files changed, 13 insertions(+), 5 deletions(-) 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 @@ Sponsors the issue at FreedomSponsors.org - http://www.freedomsponsors.org/core/issue/sponsor?trackerURL=${baseurl}/browse/${issue.key} + + http://www.freedomsponsors.org/core/issue/sponsor?trackerURL=${baseUrl}/browse/${issue.key} diff --git a/src/main/resources/sponsorthis.vm b/src/main/resources/sponsorthis.vm index a3e24ee..e0a53b3 100644 --- a/src/main/resources/sponsorthis.vm +++ b/src/main/resources/sponsorthis.vm @@ -1,3 +1,3 @@

- 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 40f7b13c61de9340d51e50fda22a1c2c55945461..b9adb77cd9e1e0546dfccf649fcaa4dc57ffeca7 100644 GIT binary patch delta 2173 zcmZuz2{hFE7oUZhVl0!LBHK{Y3?VgS7+c0tvgCyW$8M{ZHrrzvtX@@ArQ1z2}~LzTf+~vyG6gTM!X@8>oN~ zXonWC@LUnKUGrEtVP;X{_gtI`y;G=5TU>C3v2AwAYe-++IXv)_n&k0Rm)%R&re-WP z%;v_K%hY1V#SrbznFFL22is*NryBjHHlsWW-D`}Gi^UMP1^iR2P>%(^xMeJpEp5(g zqXi#s_VV1R!_jHUwxPfN71B}nVPb%y8VBU*g46NAIE>oFo=~xt_L4DC>xDMKpwO+J zDfmvA03MKT{AvKE^D8C5*R&@OK|mmaAP6MMuiiT{$U7o}>>Z2=4T|z72V<#}pgO0a z;OE-n$K5Q5ZP{??!*HXmyG2Ci;=R`@1Wnn#X>fL9o3y$Hzds`!kSWERqFN+oiYCtAiy#AA7Y~8Fy!Hv0v7(G@WTFuRV z7;}Wz+*1whn37+75t*)<@@riQ7TeiD(hEw~QzcQTZitCvXX91Q!-~UV#&w=45m9Fk zBs0X!T-C+yK$5MizAbfFsg|wlSiL>?*ZCCs^kU6}ux^3p3D8T;(`mv!J!f1e;(RQ0 z9z1ZE)-GiURnM9F(EKFPF(q6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