Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-16019

Thumbnails and Resources in Plugins

    XMLWordPrintable

Details

    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      Hi Guys,

      In Kaamelot Plugin, I provided 2 Portlets with different Configuration but with the same rendering.

      Under JIRA 3.10, I declared the thumbnail using file-server Servlet with download/resources.

      Declarations was as follow :

      	<resource type="download" name="fastworklog" location="portlets/dashboard/thumbnails/fastworklog.png" />
      	<resource type="download" name="corner_fastworklog" location="portlets/dashboard/thumbnails/corner_fastworklog.png" />
      
      	<webwork1 key="Actions" name="Actions Added" class="java.lang.Object">
      		...
      	</webwork1>
      
      	<portlet key="fast-worklog-on-request" name="Fast WorkLog" class="com.atlassian.jira.portal.portlets.FastWorklogPortletOnRequest">
      		...
      		<thumbnail>download/resources/jira.plugin.kaamelot.core:Actions/fastworklog</thumbnail>
      		...
      	</portlet>
      
      	<portlet key="fast-worklog" name="Fast WorkLog" class="com.atlassian.jira.portal.portlets.FastWorklogPortlet">
      		...
      		<thumbnail>download/resources/jira.plugin.kaamelot.core:Actions/fastworklog</thumbnail>
      		...
      	</portlet>
      

      Since JIRA 3.13 (perhaps 3.11 or 3.12, I do not have verified), the usage of file-server Servlet for thumbnail seems to be forced (See KAAM-260).
      Then, I modified declarations as follow :

      	<resource type="download" name="fastworklog" location="portlets/dashboard/thumbnails/fastworklog.png" />
      	<resource type="download" name="corner_fastworklog" location="portlets/dashboard/thumbnails/corner_fastworklog.png" />
      
      	<portlet key="fast-worklog-on-request" name="Fast WorkLog" class="com.atlassian.jira.portal.portlets.FastWorklogPortletOnRequest">
      		...
      		<thumbnail>portlets/dashboard/thumbnails/fastworklog.png</thumbnail>
      		...
      	</portlet>
      
      	<portlet key="fast-worklog" name="Fast WorkLog" class="com.atlassian.jira.portal.portlets.FastWorklogPortlet">
      		...
      		<thumbnail>portlets/dashboard/thumbnails/fastworklog.png</thumbnail>
      		...
      	</portlet>
      

      In practical, it is more easy for my plugin and any others, but in details, more with coming Plugin Version 2, we lost possibility to extend a module of an existing plugin in another plugin.

      Imagine that my Portlets was provided twi different Plugins, it would be useful to share some resource !
      Do you agree ?

      Then, is there a way to define explcitely that a ressources is or not embedded in current plugin.

      Vincent

      Attachments

        Activity

          People

            Unassigned Unassigned
            5d77aaa81033 Vincent Thoulé
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: