Settings Managenent

Overview

JIRA provides Administration pages to view and edit JIRA Application Properties.

These pages are organized depending on the type of parameters :

  • Attachment
  • General Configuration (Settings, Internationalisation, Options)
  • Look'n Feel (Logo, Colours, Date/Time Formats)
  • Time Tracking
  • Trackback Settings
  • User Default Settings
In your plugins, you are able to configure Portlet's properties, to define which parameter are used for a report, but nothing has been done for the other Plugin's Parameters.

Through the Settings Management, Minyaa Core will offer a way to manage any setting required to parameterize the behavior of your plugins.

Define a Setting Provider

In order to access to your parameters through the Settings Management, you will have to define a Setting Provider. Process as follow :
  • Create a Class extending com.atlassian.jira.config.settings.providers.ASettingsProvider

    and implementing com.atlassian.jira.config.settings.providers.SettingsProvider

  • Declare it as Component in the atlassian-plugin.xml for your plugin.

  • In case of Minyaa Suite, dedicated SettingsProvider have been created for each Minyaa Plugin. See Minyaa time sample below :

    package com.atlassian.jira.config.settings.providers;
    
    import com.atlassian.jira.config.MinyaaProjectsKeys;
    import com.atlassian.jira.config.settings.directory.SettingsProviderDirectory;
    import com.atlassian.jira.plugin.MinyaaSuite;
    /**
     * @FQCN com.atlassian.jira.config.settings.providers.MinyaaTimeSettingsProvider
     * @author kaamelot
     * @author vthoule (Pyxis Technologies)
     * @since 3.13.1.0
     * @version 3.13.1.0
     * @description Provides Settings keys for Minyaa Projects
     */
    public class MinyaaProjectsSettingsProvider extends ASettingsProvider {
    	
    	public MinyaaProjectsSettingsProvider(SettingsProviderDirectory settingsProviderDirectory) {
    		super(settingsProviderDirectory);
    	}
    	
    	protected void init() {
    		addSetting(MinyaaProjectsKeys.JIRA_PLUGIN_MINYAA_PROJECTS_UPGRADE_VERSION, ISettings.INTEGER_SETTING_MANAGER_KEY);
    		addSetting(MinyaaProjectsKeys.JIRA_AJAX_MANAGEABLEASPROJECT_PICKER_LIMIT, ISettings.INTEGER_SETTING_MANAGER_KEY);
    	}
    
    	/**
    	 * @return Setting Provider Id. It represents a section in Settings Management screens
    	 */	
    	public String getId() {
    		return MinyaaSuite.MINYAA_PROJECTS_KEY + ".settings";
    	}
    }
    
  • and it declaration as Component in atlassian-plugin.xml as follow :

    	<component key="minyaaTimeSettingsProvider" name="MinyaaTimeSettingsProvider" class="com.atlassian.jira.config.settings.providers.MinyaaTimeSettingsProvider" />
    


Define a Setting Manager (if required)

In order to be able to view or edit the parameters, some Settings Manager have to be defined.

Minyaa Core already provides you as set of SettingManager.
  • StringSettingManager : Used to view or edit String.
  • IntegerSettingManager : Used to view or edit Integer, even if they are sorted as String in ApplicationProperties.
  • ColorSettingManager : Used to view or edit Color Settings.
If these 3 SettingManager do not allow you to manage your Plugin's properties, then you can define a new one as follow : by creating a new Class extending ASettingsManager Class and implementing SettingsManager Interface, and define it as component as follow :
  • Define new Edit and View velocity Templates.
  • Reference them in a new Class extending ASettingsManager Class and implementing SettingsManager Interface,
  • Define this Class as Component :

    <component key="NewTypeSettingManager" name="NewTypeSettingManager" class="com.atlassian.jira.config.settings.managers.NewTypeSettingManager" />
    

Setting Managment for Minyaa Settings

The behavior of some of the features provided by Minyaa Suite may parameterized, like Colors used for Gradient in Report Look'n Feel, or Worklog.Update.Delay.In.Days (Delay in Days after the End of Month where a Worklog is not alterable).



View Settings :

View Minyaa Core Setting



Edit Settings :

Edit Minyaa Core Setting