As Plugins Developer, your will find here, some details on how to implement your own Meta-Attribute Editor dedicated to your custom Meta-Attribute.
To append a new Meta-Attributes Editors, you will have to process as follow ...
<td class="fieldLabelArea">$i18n.getText("minyaa.workflows.attribute.booleanValue")</td>
<td class="fieldValueArea">
<input type="radio" name="metaAttributeBooleanValue" id="attributeRadioValue1" size="30" value="true" />
<label for="attributeRadioValue1"> $i18n.getText("admin.common.words.true")</label>
<input type="radio" name="metaAttributeBooleanValue" id="attributeRadioValue2" size="30" value="false" />
<label for="attributeRadioValue2"> $i18n.getText("admin.common.words.false")</label>
<br />
</td> |
jQuery(document).ready(function(){
MYAAWA.namespace("MYAAWA.Editors.editMetaBoolean");
MYAAWA.Editors.editMetaBoolean.init = function(inputValue) {
var editedValue = AJS.$("[name='metaAttributeBooleanValue']");
var onChanged = function(event) {
inputValue.val(event.target.value);
};
MYAAWA.Editors.editMetaBoolean.onChanged = onChanged;
editedValue.change(MYAAWA.Editors.editMetaBoolean.onChanged);
};
}); |
<web-resource key="MYAA_editMetaBoolean" name="MYAA-editMetaBoolean"> <dependency>jira.plugin.minyaa.workflows.attributes:MYAA_WorkflowsAttributes</dependency> <resource type="download" name="editMetaBoolean.js" location="com/minyaa/workflows/js/MYAA.editMetaBoolean.js"> <property key="content-type" value="text/javascript"/> </resource> <context>atl.admin</context> </web-resource> |
<meta-editor key="editMetaBoolean" name="Edit Meta Attribute as Boolean"> <resource type="velocity" name="edit" location="com/minyaa/workflows/templates/meta-attributes-edit-boolean.vm"/> </meta-editor> |
To extend the list of displayed Meta-Attributes depending on the list of supported process as follow ... Use the custom plugin module-type meta-attribute
<meta-attribute key="sampleAttribute" name="sample.attribute" isUnique="false" valueEditorKey="jira.plugin.minyaa.workflows.attributes:editMetaBoolean" > 02. <description key="sample.attribute.desc">Do nothing !.</description> 03. <scope initialAction="true" 04. globalAction="true" 05. commonAction="true" 06. stepAction="true" 07. initialStep="true" 08. normalStep="true" 09. finalStep="true" 10. /> 11. </meta-attribute> |
Discover Meta-Attributes Management and avoid typo errors in Workflow Properties |
On this page: |