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 you own 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, as follow :

    	<component key="minyaaTimeSettingsProvider" name="MinyaaTimeSettingsProvider" class="com.atlassian.jira.config.settings.providers.MinyaaTimeSettingsProvider" />
    
  • 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 (Alkaes Consulting)
     * @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";
    	}
    }
    
  • In the init() method, add each of your parameters that have to be managed by the SettingsProvider. See below the supported Settings type.


Supported Setting Type

Each Setting Type is provided by a Settings Manager.

Available Settings Manager already provided by Minyaa Boot are :

Settins ManagerOSProperty TypeDescription
STRING_SETTING_MANAGER_KEYString
  • Edit Mode:

    Edit String Setting
  • View Mode:

    View String Setting
INTEGER_SETTING_MANAGER_KEYString
  • Edit Mode:

    Edit Integer Setting
  • View Mode:

    View Integer Setting
COLOR_SETTING_MANAGER_KEYString
  • Edit Mode:

    Edit Color Setting
  • View Mode:

    View Color Setting
BOOLEAN_SETTING_MANAGER_KEYString
  • Edit Mode:

    Edit Boolean Setting
  • View Mode:

    View Boolean Setting
TEXTAREA_SETTING_MANAGER_KEYText
  • Edit Mode:

    Edit Textarea Setting
  • View Mode:

    View Textarea Setting

Define your own Setting Manager (if required)

If the provided 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

View Settings :

View Minyaa Core Setting



Edit Settings :

Edit Minyaa Core Setting