Commits

Don Brown committed 4e9fb65

Add issue_id to context params

* Fix schema for issue panel to use panel.xsd, not page.xsd
* Fix panel.xsd to include height/width

Change-Id: I0202383ddf34711826f4948c364357ed70f57f9d

Comments (0)

Files changed (3)

plugin/src/main/java/com/atlassian/labs/remoteapps/modules/jira/issuepanel/ViewIssuePanelModuleGenerator.java

     public Schema getSchema()
     {
         return new StaticSchema(plugin,
-            "page.xsd",
-            "/xsd/page.xsd",
-            "PageType",
+            "panel.xsd",
+            "/xsd/panel.xsd",
+            "PanelType",
             "unbounded");
     }
 

plugin/src/main/java/com/atlassian/labs/remoteapps/product/jira/JiraProductAccessor.java

 import com.atlassian.labs.remoteapps.product.WebSudoElevator;
 import com.atlassian.plugin.web.WebInterfaceManager;
 import com.atlassian.plugin.web.descriptors.WebItemModuleDescriptor;
+import com.google.common.collect.ImmutableMap;
 
 import java.util.Map;
 
     @Override
     public Map<String, String> getLinkContextParams()
     {
-        return singletonMap("project_id", "$!helper.project.id");
+        return ImmutableMap.of(
+                "project_id", "$!helper.project.id",
+                "issue_id", "$!issue.id");
     }
 }

plugin/src/main/resources/xsd/panel.xsd

         <xs:attribute name="key" type="KeyType" use="required" />
         <xs:attribute name="name" type="NameType" use="required" />
         <xs:attribute name="url" type="RelativeUrlType" use="required" />
+        <xs:attribute name="height" type="PixelType" />
+        <xs:attribute name="width" type="PixelType" />
     </xs:complexType>
 </xs:schema>