Fragment Portlet for Predefined Report

Minyaa Suite provides also ...

Overview

The concept of Fragment Portlet is provided in order to offer links to your preferred Links, generally some Report with all predefined parameters.

The Portlet displays a list of Links defined in <web-item>.

It means that it may offer any Link defined in JIRA : Menu Items, Issue Operation, Project Action, or any other <web-item> you will have defined in your plugin ...



As all of these possibilities have not always pertinent, the Portlet Configuration will propose only <web-item> having section based on the location "portlet.fragment".

Predefined Reports

Are also defined 2 <web-section> based on the location "portlet.fragment" :

  • predefined.user.report : For Reports using mainly User in their parameters
  • predefined.project.report : For Reports using mainly Project in their parameters
To define a such predefined report, you have to add in the atlassian-plugin.xml a <web-item> module for each wanted report.

The below sample provides a link to the report your.jira.plugin.key:reportKey with a fixed parameter and dynamic parameter ($user for current user) :
  • Exemple ...

    <web-item key="webItemKey" name="webItemName" i18n-name-key="webItemNameI18NKey" section="browser.project.preset.reports" system="false" weight="1">
    	<label key="webItemLabelKey" />
    	<link linkId="webItemLinkId">/secure/ConfigureReport.jspa?reportKey=your.jira.plugin.key:reportKey&amp;anyParam=anyValue&amp;author=$user</link>
    	<resource type="i18n" name="i18n" location="com.company.jira.webfragments.reports" />
    	<condition class="com.company.jira.plugin.webfragment.conditions.YourCondition"/>
    </web-item>
The condition section is optional. You are able to use any condition extending com.atlassian.jira.plugin.webfragment.conditions.AbstractJiraCondition. You can also create any other condition in responding to you requirements.

Portlet Configuration

The Portlet Configuration is very simple. Only 2 parameters are required :
  • The Project : Project on which Predefined Reports will be runned (For Report having Project as parameter).
  • The Predefined Report Type : It represents the section Id. in the <web-item> module declaring the Reports.

    The default one is browser.project.preset.reports.
FragmentPortlet Predefined Report Config

FragmentPortlet Predefined Report

In the current release, Minyaa Suite Plugin provides some predefined reports, based on Workload Issue-Type Report with the same parameters, excepted the dates :
  • reportId=RS,WM,CA,PR,IS
  • unitType=1
  • showKey=yes
  • showIssueType=icon
  • showSummary=yes
  • reportKey=jira.plugin.minyaa.time:workload-IssueType
  • author=$user
  • startDate and endDate depending on the report :
    • Report on my work of previous Month : startDate=BOM-1M&endDate=EOM-1M
    • Report on my work of Current Quarter : startDate=BOQ&endDate=EOQ
    • Report on my work of previous Quarter : startDate=BOQ-1Q&endDate=EOQ-1Q
FragmentPortlet Predefined Report

How to create Predefined Reports

To create your own Predefined Report, you will have to build your own Plugin. At least, this plugin will have to provide following files :
  • atlassian-plugin.xml where you will define all your predefined reports ...

    <atlassian-plugin key="jira.plugin.your.comapany.reports" name="Your Company JIRA Plugin Predefined Reports">
    
    	<plugin-info>
    		<description>Atlassian JIRA Plugin - Your Company Predefined Reports</description>
    		<version>1.0</version>
    		<application-version min="3.13" max="3.13" />
    		<vendor name="Your Company" url="http://your.company.com" />
    	</plugin-info>
    
    	<!-- Report with your Parameters -->
    	<web-item key="your.predefined.report" name="Your Predefined Report" i18n-name-key="webfragments.preset.reports.item.your.predefined.report" section="browser.project.preset.reports" system="false" weight="1">
    		<label key="weblink.reports.your.predefined.report" />
    		<link linkId="your.predefined.report">/secure/ConfigureReport.jspa?reportKey=jira.any.plugin:report.key&amp;param1=value1&amp;param2=value2&amp;author=$user</link>
    		<resource type="i18n" name="i18n" location="com.company.jira.webfragments.predefinedReports" />
    	</web-item>
    
    </atlassian-plugin>
  • com/company/jira/webfragments/predefinedReports.properties where you will define required I18n properties ...

    # A Predefined Report 
    webfragments.preset.reports.item.your.predefined.report=Short Report Description 
    weblink.reports.your.predefined.report=Detailed Report Description